public ActionResult Edit(PartyEdit party) { if (ModelState.IsValid) { _userId = Guid.Parse(User.Identity.GetUserId()); _partyService = new PartyService(_userId); _partyService.EditParty(party); return(RedirectToAction("Index")); } ViewBag.CategoryId = new SelectList(db.Categories, "CategoryId", "Name", party.CategoryId); ViewBag.LocationId = new SelectList(db.Locations, "LocationId", "Name", party.LocationId); ViewBag.NeighborhoodId = new SelectList(db.Neighborhoods, "NeighborhoodId", "Name", party.NeighborhoodId); return(View(party)); }