Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var data =
- from country in db.GetTable<Country>().Where(c=>c.Allowed)
- let totalTeams = country.Teams.Count()
- let teamsWithoutOwner = country.Teams.Count(t=>t.OwnerId != 0)
- select new CountryTeamsInfo
- {
- CountryId = country.Id,
- TeamsTotal = totalTeams,
- TeamsWithoutOwnerFree = teamsWithoutOwnerFree
- };
Add Comment
Please, Sign In to add comment