-
July 18th, 2011, 01:06 PM
#1
Linq question
Hello,
I have an EF model which includes a list of planes, and each plane has a list of passengers. I would like to write a linq query that from the resulting list of planes, I can do this:
foreach(Plane t_plane in t_queryPlanes) {
Console.writeLine(t_plane.Passengers.Count());
}
I know I do an individual load on each passenger list, but that would be unnecessary since I don't need the passenger object, just the count.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|