var salesResult = (from sale in T_Sales
where ((DateTime)sale.Sale_Date).Date == DateTime.Today
select sale).ToList();
The above code will raise the following exception:
The specified type member 'Date' is not supported
in LINQ to Entities. Only initializers, entity members, and entity navigation
properties are supported.
I found out form this link that there are EntityFunctions available. So the above code can be replaced with the code below to work:
var salesResult = (from sale in T_Sales
where EntityFunctions.TruncateTime((DateTime)sale.Sale_Date) == DateTime.Today
select sale).ToList();
However checking the details of this EntityFunctions on the MSDN site I found out that it is only available to Framework 4.0 and 4.5.