public ActionResult Add(LookupCode model) { if (ModelState.IsValid) { Context.LookupCode dbitem = new Context.LookupCode(); model.setDb(dbitem); RepoLookup.save(dbitem); return(RedirectToAction("Index")); } return(View("Form", model)); }
public ActionResult Edit(LookupCode model) { if (ModelState.IsValid) { Context.LookupCode dbitem = RepoLookup.FindByPK(model.Id); model.setDb(dbitem); RepoLookup.save(dbitem); return(RedirectToAction("Index")); } return(View("Form", model)); }