Beispiel #1
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            var movie = new Movie()
            {
                Id           = id,
                Name         = collection["Name"],
                YearReleased = int.Parse(collection["YearReleased"]),
                Director     = collection["Director"].ToString(),
                GenreId      = int.Parse(collection["GenreId"]),
                IsCheckedIn  = bool.Parse(collection["IsCheckedIn"])
            };
            var newMovie = movieService.Edit(id);

            return(RedirectToAction("Index"));
        }