You can try this by
query syntax:
var groupjoinquery = from mf in manufactures join car in cars on mf.Name equals car.Manufacture into carGroup select new { MFS = mf, CARS = carGroup } into res group res by res.MFS.Headquarter;
OR extension method:
var groupjoinextensionmethod = manufactures.GroupJoin(cars, m => m.Name, c => c.Manufacture, (m, c) => new { MFS = m, CARS = c } ) .OrderBy(m => m.MFS.Name);
Question and answer is powered by AnsPress.io