score:3

Accepted answer
wootz = wootz.Where(x => x.CheckClearDate >= new DateTime(DateTime.Now.Year, 1, 1));

That doesn't look right. Entity Framework doesn't understand this constructor. You should be able to fix this part by making it a parameter:

var startOfYear = new DateTime(DateTime.Now.Year, 1, 1);
wootz = wootz.Where(x => x.CheckClearDate >= startOfYear);

A search also brings up EntityFunctions.CreateDateTime as an alternative.

(Note: I haven't checked if this is the only problem.)


Related Articles