Hi Otis,
First, my apologies for not responding sooner, I've been uncommonly busy. Basically, I am after a fast (and preferably code-free) way of creating a typed list that would be the same as the following query ...
select
album_id as id,
album_title as title,
(
select
count(*)
from dbo.image i
where i.album_id = a.album_id
) as imagecount
from
dbo.album a
I use typed lists all the time for my view<entitytype> web-pages and I determine whether the user should be able to delete the parent entity, by the number of associated child entities. So in summary, if an album has 0 images delete is allowed and if an album has 1+ images then delete is not allowed.
Now this could be achieved by applying a group by to the generated typed list but its not a flexible solution. If I was to add a new field to the typed list from the parent table (album) then the groupby must also be updated.
Is this making any sense? I have been drinking beer
Cheers, Pete