SHARE
TWEET

http://stackoverflow.com/questions/10203191

a guest Apr 19th, 2012 25 Never
  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. };
RAW Paste Data
Top