Пример #1
0
        // GET: Movies/Details/5
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var movie      = _service.GetMovieById((int)id);
            var screenings = _service.GetScreeningsByMovieId((int)id);

            if (movie == null || screenings == null)
            {
                return(NotFound());
            }

            ViewBag.Movie      = movie;
            ViewBag.Screenings = screenings;
            return(View());
        }