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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -