Ejemplo n.º 1
0
        public async Task <Season> GetSeasonAsync(int seasonId)
        {
            Season season = _seasons.Values.FirstOrDefault(s => s.SeasonId == seasonId);

            if (season == null)
            {
                season = await _seasonRepository.GetSeasonAsync(seasonId);

                if (season != null)
                {
                    _seasons.Add(DateTime.Now, season);
                }
            }

            return(season);
        }