public ActionResult Edit(int id, Limweightedduration model) { try { InitRepos(true, false); model.Instruments = instrRepo.GetById(model.InstrumentId); limRepo.Update(model); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Limweightedduration model) { try { // TODO: Add insert logic here InitRepos(true, false); model.Instruments = instrRepo.GetById(model.InstrumentId); limRepo.Create(model); return(RedirectToAction("Index")); } catch { return(View()); } }