Join Extension Method
I am having trouble figuring out how to do a simple left join using linq
in an extension method.
I need to use an extension method as opposed to a comprehension query as I
am paging the results.
var carParkPagedList =
db.CarPark
.Join(db.UserProfiles, cp => cp.UserProfileId, up => up.UserId, (cp, up))
.OrderBy(f => f.Name)
.Where(f => f.FloorId == floorId)
.Select(f => new CarParkListDisplayModel
{
CarParkId = f.CarParkId,
Name = f.Name
}).ToPagedList(page, 10);
I cannot find help on this anywhere, I have tried 101 linq examples and
this is find for comprehension queries but won't provide any support for
extension methods.