Reputation: 2285
I am using Entity frame work, i want to convert SQL query of LIKE date to Entity framework. here is the query
Select * from Schedule where SerialNo='11119' and DueDate like '%2012%'
Upvotes: 1
Views: 556
Reputation: 5989
Try this:
dbcontext.Schedules.Where(s => s.SerialNo == '11119' && s.DueDate.Year == 2012)
Upvotes: 3