SELECT Cities.CityName, Customers.CustomerName, SUM(Bills.Sarees)
FROM Bills INNER JOIN
Customers ON Bills.CustomerID = Customers.CustomerID INNER JOIN
Cities ON Customers.CityID = Cities.CityID
Group by CustomerName, CityName
以下のように作成しようとしましたが、groupby句を挿入できません。
var query = db.Bills.Join(db.Customers, c => c.CustomerID, p => p.CustomerID, (c, p) => new
{
c.Customer.CustomerID,
c.Customer.CustomerName,
c.Customer.City.CityName,
c.Customer.Mobile1,
c.Customer.Mobile2,
c.Customer.Telephone,
c.Customer.Email,
c.Sarees
});