public ActionResult Edit([Bind(Include = "roleIdentifierID,role")] RoleIdentifier roleIdentifier) { if (ModelState.IsValid) { db.Entry(roleIdentifier).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(roleIdentifier)); }
public ActionResult Edit([Bind(Include = "recordID,identifier,roleIdentifierID")] RoleIdentifierDetails roleIdentifierDetails) { if (ModelState.IsValid) { db.Entry(roleIdentifierDetails).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.roleIdentifierID = new SelectList(db.RoleIdentifier, "roleIdentifierID", "role", roleIdentifierDetails.roleIdentifierID); return(View(roleIdentifierDetails)); }
public ActionResult Edit(int id, Fields fields) { try { // TODO: Add update logic here db.Entry(fields).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }