There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Query: Better support for DateTime operators
It would be great if linq to entites could parse more common DateTime properties and methods such as the Date property and AddDays() within a linq to entities query. For instance currently if you wish to ignore the time portion of a DateTime member in
a linq to entities query then you have to use EntityFunctions.TruncateTime(object.DateTimeProperty) instead of object.DateTimeProperty.Date. This solution currently doesn't work with Sql Server CE 4.0. That is one issue but I think a far bigger one is that
a bigger api disconnect is introduced between linq to objects and linq to sql etc One of the beautiful things about linq is (for the most part) a query that runs against linq to sql has a very good chance of running against linq to objects. This is fantastic
for such things as the specification pattern. I understand that different providers will not necessarily be able to parse every expression tree that can be handled by other providers. However using EntityFunctions or SqlFunctions guarantees that it won't,
as it is now tightly coupled to linq to entities. I would like to see more effort in making properties such as DateTime.Date and methods such as DateTime.AddDays() work in a more homogeneous way when compared to the other providers. Hope this is taken as constructive
This item was migrated from the DevDiv work item tracking system [ID=147251].
This work item originated from connect.microsoft.com. A member of the EF team at Microsoft should close the related Connect issue when closing this work item.