Example #1
0
        public NFLSeasonDTO GetCurrentNFLSeason()
        {
            _mapper.ExcludeProperty <NFLTeam, NFLTeamDTO>("HomeGames");
            _mapper.ExcludeProperty <NFLTeam, NFLTeamDTO>("AwayGames");

            var season        = _nflSeasonService.GetCurrentNFLSeason();
            var currentSeason = _mapper.Map <NFLSeasonDTO>(season);

            currentSeason.CurrentWeek = _mapper.Map <NFLWeekDTO>(_nflSeasonService.GetNFLWeek(season.CurrentWeekId));

            return(currentSeason);
        }
Example #2
0
 public IEnumerable <NFLTeamDTO> GetNFLTeams()
 {
     return(_nflTeamService.GetAllTeams().Select(t => _mapper.Map <NFLTeamDTO>(t)));
 }
Example #3
0
 public NFLWeekDTO GetMappedCurrentWeek()
 {
     return(Mapper.Map <NFLWeekDTO>(GetCurrentWeek()));
 }