I have two database tables :
1) Locations which has many Staffs
2) Staffs which has many Roles
If I want to load only related staffs which have Supervisor role for specific location I would do like this:
var location = dbContext.Locations.Find(locationId);
dbContext.Entry(location).Collection(b => b.Staffs).Query().Where(s => s.Roles.Any(r => r.Name=="Supervisor"));
My question is how to achieve explicit loading for related Staffs with supervisor role for all locations(I don't need for specific one as above)?