private void UpdateInvestments() { foreach (var invest in Investments) { invest.Invested += invest.Invested / 100; investRepo.UpdateInvestment(invest.Investment); } }
public ActionResult Edit(InvestmentViewModel investment) { try { // TODO: Add update logic here InvestmentRepository.UpdateInvestment(investment, User.Identity.Name); return(RedirectToAction("Index")); } catch (Exception ex) { throw ex; return(View(investment)); } }