public ActionResult RateMovie(RateMovieCarrier rateMovie)
        {
            var ops = new DVDLibraryOperations();
            ops.AddUserReview(rateMovie.Rating, rateMovie.MovieID, rateMovie.UserID, rateMovie.Note);

            var userRentalsVM = new RentalListViewModel(ops.GetUserOutForRent(rateMovie.UserID));

            return View("UserRentalList", userRentalsVM);
        }
 public RateMovieViewModel(RateMovieCarrier rateMovie)
 {
     this.RateMovie = rateMovie;
 }
        public RateMovieCarrier GetMovieByRentalID(int RentalID)
        {
            using (SqlConnection cn = new SqlConnection(Settings.ConnectionString))
            {
                var rateMovie = new RateMovieCarrier();

                var p = new DynamicParameters();
                p.Add("RentalID", RentalID);

               rateMovie = cn.Query<RateMovieCarrier>("GetMovieByRentalID", p, commandType: CommandType.StoredProcedure).FirstOrDefault();

                return rateMovie;
            }
        }