I am using Entity Framework with MYSQL database. I am trying to get result from following query.
select COUNT(*) from tbldata where CreatedBy is not null and created is not null and DATE(Created) = DATE(NOW())
Above query returned accurate result. I have tried this query in E.F but it returns zero Count.
var todayDate = DateTime.Now.Date;
_db.TblData.Where(c => c.CreatedBy != null && c.Created != null && c.Created == todayDate)
.Count();
How can I compare only date value in E.F?
Thank you