Exemplo n.º 1
0
        public async Task <IActionResult> Index([FromServices] IInstitutionService institutionService, [FromServices] IDonationService donationService, [FromServices] ICategoryService categoryService)
        {
            var viewModel = new IndexViewModel()
            {
                InstitutionList         = await institutionService.GetAllAsync(),
                CountSupportedCharities = await donationService.CountInstitution(),
                SumOfQuantity           = await donationService.SumOfAllQuantity(),
            };

            return(View(viewModel));
        }