// GET: Profiles/Create public ActionResult Create() { ProfileMoviesJobsViewModel model = new ProfileMoviesJobsViewModel { AllMovies = MovieDb.GetAllMovies(db), AllJobs = JobDb.GetAllJobs(db) }; return(View(model)); }
// GET: Profiles/Edit/5 public ActionResult Edit(int?id) { if (!id.HasValue) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Profile profile = ProfileDb.FindProfile(db, id.Value); if (profile == null) { return(HttpNotFound()); } ProfileMoviesJobsViewModel model = new ProfileMoviesJobsViewModel { Profile = profile, AllMovies = MovieDb.GetAllMovies(db), AllJobs = JobDb.GetAllJobs(db) }; return(View(model)); }