public ActionResult Edit([Bind(Include = "RoleId,role,Description,DateCreated,DateUpdated")] Role role) { if (ModelState.IsValid) { db.Entry(role).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(role)); }
public ActionResult Edit([Bind(Include = "UserId,UserName,FirstName,LastName,Email,DateCreated,DateUpdated")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public ActionResult Edit([Bind(Include = "CampaginId,Name,Description,DungeonMasterId,DateCreated,DateUpdated")] Campaign campaign) { if (ModelState.IsValid) { db.Entry(campaign).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DungeonMasterId = new SelectList(db.Users, "UserId", "UserName", campaign.DungeonMasterId); return(View(campaign)); }