i have a problem in in Linq to entity when selecting this is my code
i want to select with date and id
Login Lo = new Login();
DateTime CurrentDate = DateTime.Now;
Lo = db.Logins.Where(i => i.Emp_id == employee.id &&
DbFunctions.TruncateTime(i.WorkDay).Value.Date == DbFunctions.TruncateTime(CurrentDate).Value).FirstOrDefault();
it give me this Error :
The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.