public IActionResult Index() { SFundDb db = new SFundDb(_connectionString); ContributionsViewModel vm = new ContributionsViewModel(); vm.Contributors = db.GetContributors(); return(View(vm)); }
public IActionResult Contributions(int Id) { SFundDb db = new SFundDb(_connectionString); ContributionsViewModel vm = new ContributionsViewModel(); vm.Simcha = db.GetSimcha(Id); vm.Contributors = db.GetContributors(); vm.SimchaContributions = db.GetContributions().Where(c => c.SimchaId == Id).ToList(); return(View(vm)); }
public IActionResult Index() { SFundDb db = new SFundDb(_connectionString); SimchasViewModel vm = new SimchasViewModel(); vm.Simchas = db.GetSimchas(); vm.ContributorCount = db.GetContributors().Count; vm.Contributions = db.GetContributions(); return(View(vm)); }