public IActionResult TicketMovie(string title) { var ticket = new TicketSalesStatisticsMovie(dbcontext); ticket.Filter(movies.FindById(movies.GetAllMovies().Where(m => m.Title.ToUpper() == title.ToUpper()).First().Id)); return(View((movies.GetAllMovies(), ticket.TicketsSold))); }
public IActionResult Delete(int?id) { if (id == null || id == 0) { return(NotFound()); } var movie = movies.FindById((int)id); if (movie == null) { return(NotFound()); } ViewBags(); return(View(movie)); }