Esempio n. 1
0
        public IActionResult Index()
        {
            var rep    = new DonorRepository(_connectionString);
            var donors = rep.AllDonors();

            foreach (var don in donors)
            {
                don.Ballance = rep.GetBalanceForDonor(don);
            }
            var vm = new DonorViewModel
            {
                Donor = donors
            };

            return(View(vm));
        }