public IActionResult AddContributor(Contributor c, Deposit d) { var repo = new SimchaRepository(_connectionString); repo.AddContributor(c, d); return(Redirect("/contributors/index")); }
public IActionResult AddContributor(Contributor contributor, Deposit deposit) { _repo.AddContributor(contributor); deposit.ContributorId = contributor.Id; _repo.AddDeposit(deposit); return(Redirect("/home/displaycontributors")); }