I am trying to execute the following code and am receiving an error
public List GetLoggingData(DateTime LogDate, string title)
{
var context
If you are using EF 6.0+, you can use DbFunctions.TruncateTime(DateTime?) :
var query =
from t in context.Logs
where t.Title == title
&& DbFunctions.TruncateTime(t.Timestamp) == LogDate.Date
select t;
Note: For earlier version of EF where
DbFunctionsisn't available, EntityFunctions.TruncateTime(DateTime?) can be used instead.