注文数が最も多い従業員を見つけたい:このコードは、すべてのユーザーからのすべての注文数を取得します。
public void GetBestEmployeeFromDates(DateTime fromDate, DateTime toDate)
{
using (NorthwindDataContext db = new NorthwindDataContext())
{
var query =
from z in db.Employees
select new
{
OrderNumber = z.Orders.Where(x => x.OrderDate > fromDate.Date).Count()
};
}
}
どうすればいいですか?