Beispiel #1
0
 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());
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public IActionResult ShowList() => View(showRepo.GetAllShows());
Beispiel #4
0
 public ActionResult <IEnumerable <Show> > GetAllShows() => Ok(_repository.GetAllShows());
Beispiel #5
0
 public IEnumerable <Show> GetAllShows()
 {
     return(repository.GetAllShows());
 }
Beispiel #6
0
 // GET: Shows
 public IActionResult Index() => View(showRepo.GetAllShows());