c# - Why do I get "variable referenced from scope but not defined" error when using ServiceStack OrmLite? -
i have sql server table employee
column entrydate
defined datetime
.
i have following poco:
public class employee { public int id {get; set;} public datetime entrydate {get; set;} ... }
when query table using:
db.select<employee>(e => e.entrydate >= new datetime(2014, 8, 15));
or:
db.select<employee>(q => q.where(e => e.entrydate >= new datetime(2014, 8, 15)));
i expect, however when try run:
db.select<employee>(e => e.entrydate.date >= new datetime(2014, 8, 15).date));
or:
db.select<employee>(q => q.where(e => e.entrydate.date >= new datetime(2014, 8, 15).date));
i get:
variable 'e' of type 'employee' referenced scope '', not defined
just confirm, writing raw sql works fine.
any ideas?
Comments
Post a Comment