コード例 #1
0
 private void UpdateInvestments()
 {
     foreach (var invest in Investments)
     {
         invest.Invested += invest.Invested / 100;
         investRepo.UpdateInvestment(invest.Investment);
     }
 }
コード例 #2
0
 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));
     }
 }