I'm trying to execute a LINQ to Entities query (I'm still very new to EF and learning where it differs from LinqToSQL), and I'm trying to do something like this:
DateTime begin = new DateTime(2011, 1, 1); Apps = (from app in context.Instances where app.ReleaseDate.Date == begin select new ScalpApp { Image = app.Image, PublisherName = app.PublisherName, }).ToList();
although this works in LinqPad, it is not in my code. Exception Excluded:
The specified type member 'Date' is not supported in LINQ to Entities.
Only initializers, entity members, and entity navigation properties are supported.
How to do it in LinqToEF? The field in the DB is a full DateTime (with a timecode), and I'm trying to parse based on date only.
source share