Forcing LINQ to SQL to make one single call for all child rows
- by zaph0d
Let say I have a method (example taken from another post):
public IQueryable<CityBlock> GetCityBlocks(){
var results = from o in db.city_blocks
let buildings = GetBuildingsOnBlock(o.block_id) //returns Iqueryable
select new CityBlock {
BuildingsOnBlock = buildings,
…