public IActionResult Deposit(Deposit deposit) { var manager = new SimchaChipInManager(_connectionString); manager.AddDeposit(deposit); TempData["message"] = "Deposit successfully recorded"; return(RedirectToAction("Index")); }
public IActionResult New(Contributor contributor, decimal initialDeposit) { var manager = new SimchaChipInManager(_connectionString); manager.AddContributor(contributor); var deposit = new Deposit { Amount = initialDeposit, ContributorId = contributor.Id, Date = contributor.Date }; manager.AddDeposit(deposit); return(RedirectToAction("index")); }