예제 #1
0
        public async Task <IActionResult> Movie(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var movie = _repository.GetMovieById(id);
            var seen  = _repository.CheckIfSeenByUser(id, User.Identity.Name);

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

            ViewData["seen"] = seen;

            return(View("~/Views/Home/MovieDetail.cshtml", movie));
        }