Exemplo n.º 1
0
        public async Task <IEnumerable <TeamDto> > GetForMatchAsync(ScopedFilter filter, int match)
        {
            var mo    = (await _matchService.FindById(match)).AsModel(this._context);
            var clubs = await this._context.Teams.Where(t => t.MatchTeams.All(m => m.MatchId != match) && mo.Day.League.Id == t.League.Id).ToListAsync();

            return(clubs.Select(c => c.MapToTeamDto()));
        }