I want get all the records between two times:
var Check1 = db.WorkingTs
.Where(x => DbFunctions.TruncateTime(x.WorkingTime).Value.TimeOfDay >= FTime.TimeOfDay
|| DbFunctions.TruncateTime(x.WorkingTime).Value.TimeOfDay <= FBtime.TimeOfDay
&& x.FlightsCid == Crewstuff.id)
.FirstOrDefault();
but I get the following error:
The specified type member 'Time Of Day' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
I also tried DbFunctions.CreateTime()
, but the same error still appears.
Thanks