示例#1
0
        public IActionResult Deposit(Deposit deposit)
        {
            var rep = new DonorRepository(_connectionString);

            rep.AddDeposit(deposit);

            return(Redirect("/donor/index"));
        }
示例#2
0
        public IActionResult NewDonor(Donor donor, decimal amount)
        {
            var rep = new DonorRepository(_connectionString);

            rep.AddNewDonor(donor);

            var deposit = new Deposit
            {
                DonorId     = donor.Id,
                Amount      = amount,
                DepositDate = donor.DateCreated
            };

            rep.AddDeposit(deposit);

            return(Redirect("/donor/index"));
        }