public ActionResult Edit(int id, Limdealer model) { try { InitRepos(true, false); model.Currencies = currRepo.GetById(model.CurrencyId); model.Dealer = dealersRepo.GetById(model.UserId); limRepo.Update(model); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Limdealer model) { try { // TODO: Add insert logic here InitRepos(true, false); model.Currencies = currRepo.GetById(model.CurrencyId); model.Dealer = dealersRepo.GetById(model.UserId); limRepo.Create(model); return(RedirectToAction("Index")); } catch { return(View()); } }