I have a rather complicated query that I\'d like to have return some particular types. Mostly concerning date / time calculations or string values, the Entity Framework seems t
You can only use supported members in L2E queries, and Date isn't one of those.
One workaround is to break your single L2E query into one L2E query followed by one LINQ to Objects query:
var q = from e in Context.Entities
select new
{
Id = e.Id,
DateTime = e.DateTime
};
var r = from e in q.AsEnumerable()
select new
{
Id = e.Id,
Date = e.DateTime.Date
};