public async Task OnGet() { var guilds = await _repo.GetAllGuilds(); GuildsWithSubs = new List <GuildWithSubs>(); var allsubs = await _repo.GetAllGuildSubscriptions(); foreach (var guild in guilds) { var subs = allsubs.Where(s => s.GuildId == guild.Id); GuildsWithSubs.Add(new GuildWithSubs(guild, subs)); } }