public void AddShowTest() { Assert.Empty(repo.GetAllShows()); repo.Add(new Show { name = "The Super Awesome Show", date = DateTime.Parse("4/20/2018 4:20PM"), cost = 1, minAge = 18, type = ShowType.Public, description = "This show really will be the best, that is why it is the super awsome show." }); Assert.Single(repo.GetAllShows()); }
public ShowStatistics CalculateShowStatistics(List <string> libraryIds) { var shows = _showRepository.GetAllShows(libraryIds, true, true); var statistics = new ShowStatistics { Cards = CalculateCards(libraryIds), TopCards = CalculateTopCards(libraryIds), People = CalculatePeopleStatistics(libraryIds), BarCharts = CalculateBarCharts(shows), PieCharts = CalculatePieChars(shows) }; var json = JsonConvert.SerializeObject(statistics); _statisticsRepository.AddStatistic(json, DateTime.UtcNow, StatisticType.Show, libraryIds); return(statistics); }
public IActionResult ShowList() => View(showRepo.GetAllShows());
public ActionResult <IEnumerable <Show> > GetAllShows() => Ok(_repository.GetAllShows());
public IEnumerable <Show> GetAllShows() { return(repository.GetAllShows()); }
// GET: Shows public IActionResult Index() => View(showRepo.GetAllShows());