I need to get the query of the day, the problem is that I'm getting an error when I try to compare the value that comes from the DB (which is a DateTime
), against the DateTime.Today.Date
value.
What I'm trying to achieve is to get the registers of the day.
List<Client> _cliente = from c in db.Cliente
join v in db.Vendedor
on c.IDVendedor equals v.IDVendedor
where v.Fecha.Date.Equals(DateTime.Today.Date)
This is what I'm getting: 'The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.'