public ActionResult Edit(Guid id)
        {
            var newMovie = new MovieModel();

            var movie = _session.Get<Movie>(id);
            if (movie != null)
            {
                newMovie.Id = movie.Id;
                newMovie.Name = movie.Name;
                newMovie.ReleaseDate = movie.ReleaseDate;
            }
            return View(newMovie);
        }
 public ActionResult AddNew(MovieModel model)
 {
     var newMovie = new Movie();
     using (var tr = _session.BeginTransaction())
     {
         {
             newMovie.Id = model.Id;
             newMovie.Name = model.Name;
             newMovie.ReleaseDate = model.ReleaseDate;
             _session.Save(newMovie);
         }
         tr.Commit();
     }
     return RedirectToAction("List");
 }
 public ActionResult Edit(MovieModel model)
 {
     using (var tr = _session.BeginTransaction())
     {
         var movie = _session.Get<Movie>(model.Id);
         if (movie != null)
         {
             movie.Name = model.Name;
             movie.ReleaseDate = model.ReleaseDate;
             _session.Save(movie);
         }
         tr.Commit();
     }
     return RedirectToAction("List");
 }
        public ActionResult AddNew()
        {
            var newMovie = new MovieModel();

            return View(newMovie);
        }