// GET: Borrower/Details/5 public ActionResult Details(int id) { try { using (Context ctx = new Context()) { var data = VMBorrower.MakeNew(ctx.BorrowerFindByID(id)); return(View(data)); } } catch (Exception ex) { return(View("Exception", ex)); } }
// GET: Borrower/Edit/5 public ActionResult Edit(int id) { try { using (Context ctx = new Context()) { var data = VMBorrower.MakeNew(ctx.BorrowerFindByID(id)); data.PopulateRoleItems(ctx.RoleGetAll()); return(View(data)); } } catch (Exception ex) { return(View("Exception", ex)); } }