Guest User

http://stackoverflow.com/questions/10203191

a guest
Apr 19th, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. var data =
  2. from country in db.GetTable<Country>().Where(c=>c.Allowed)
  3. let totalTeams = country.Teams.Count()
  4. let teamsWithoutOwner = country.Teams.Count(t=>t.OwnerId != 0)
  5. select new CountryTeamsInfo
  6. {
  7.     CountryId = country.Id,
  8.     TeamsTotal = totalTeams,
  9.     TeamsWithoutOwnerFree = teamsWithoutOwnerFree
  10. };
Add Comment
Please, Sign In to add comment