I'm running into a problem I can't seem to find the right direction for.
I would like to find the counts on relationships.
I have a table-- let's say "garage" and it has a relationship to vehicles. It also has a relationship to Mehcanics.
I would like to show a nice list of my garages, their name, the number of vehicles and the number of mechanics --
In SQL I might do something like this:
select garage.name, (select count(id) from mechanics where mechanic.garageid=garage.gargageid) MechanicCount,
(select count(id) from vehicles where vehicle.garageid=garage.gargageid) VehicleCount
from garage
Do I need to put this in a view? Or is there some way for it to be accomplished with LLBLGen "fields mapped onto related fields"? -- Without causing a seperate "round trip" back for each garage.
I feel like I am missing something basic here.
I'm using LLBLGen 3.5 (1/17/2013), C# .net 4.0