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