public ActionResult CreateRestaurant(RestaurantsFormModel restaurant) { if (ModelState.IsValid) { try { activitiesRepo.SaveRestaurant(restaurant); return(RedirectToAction("Index")); } catch { return(HttpNotFound()); } } //viewbaag moet weer opniew worden gemaakt ViewBag.locationId = new SelectList(db.Locations, "id", "name"); return(View(restaurant)); }