Пример #1
0
        public ActionResult Details(Guid mediaId)
        {
            var result = FilmService.GetFilmByMediaId(User.Identity.GetUserId(), mediaId);

            if (result != null)
            {
                return(View(result));
            }

            return(RedirectToAction("Index"));
        }
Пример #2
0
        public ActionResult Reviews(Guid mediaId)
        {
            var film    = FilmService.GetFilmByMediaId(User.Identity.GetUserId(), mediaId);
            var reviews = ReviewFilmService.GetAllSharedReviewsByFilmId(mediaId);

            film.UserReview = ReviewFilmService.GetUserReviewByFilmId(mediaId, this.User.Identity.GetUserId());
            film.Reviews    = reviews.Where(r => r.Id != this.User.Identity.GetUserId()).ToList();

            if (film != null)
            {
                return(View(film));
            }

            return(RedirectToAction("Index"));
        }
Пример #3
0
 public ActionResult Edit(Guid mediaId)
 {
     return(View(new EditFilmViewModel(FilmService.GetFilmByMediaId(User.Identity.GetUserId(), mediaId))));
 }