Пример #1
0
        public async Task <Guid> GetDivisionIdByScheduleAsync(Guid scheduleId)
        {
            var schedule = await _scheduleRepository.GetScheduleAsync(scheduleId);

            var homeTeam = await _teamRosterRepository.GetByTeamIdAsync(schedule.HomeRosterTeamId);

            var division = await _divisionRepository.GetDivisionByTeamScoreAsync(homeTeam.TeamTierScore.GetValueOrDefault(), homeTeam.SeasonInfoId.GetValueOrDefault());

            return(division.Id);
        }