I'm trying to get the number of tasks performed on a daily basis and plot them into a chart, but the thing is I can't figure out the pomelo entity code.
Select FirstName,count(ToDoId)
From todos as M
Inner join users as u
on M.UserId=u.UserId
where u.UserId=1
GROUP BY M.UserId, CAST(M.CreatedAt AS DATE)
Assuming corresponding model classes for your two tables, that contain navigation properties, the LINQ query could look like this:
The generated SQL would then be:
Here is a complete and working console sample project, that demonstrates the bits and pieces: