public ActionResult Create() { MovieManagerViewModel viewModel = new MovieManagerViewModel(); viewModel.Movie = new Movie(); viewModel.MovieCategories = movieCategories.Collection(); return(View(viewModel)); }
public ActionResult Edit(string Id) { Movie movie = context.Find(Id); if (movie == null) { return(HttpNotFound()); } else { MovieManagerViewModel viewModel = new MovieManagerViewModel(); viewModel.Movie = movie; viewModel.MovieCategories = movieCategories.Collection(); return(View(viewModel)); } }