示例#1
0
        public async Task <IActionResult> Index()
        {
            var user = await _userHelper.GetUserByEmailAsync(this.User.Identity.Name);

            var model = new CountDataViewModel
            {
                EmployeesCount     = await _userHelper.GetEmployeesCountAsync(),
                ClientCount        = await _clientRepository.GetClientsCountAsync(),
                PartnerCount       = await _partnerRepository.GetPartnerCountAsync(),
                BenefitsCount      = await _partnerRepository.GetBenefitsCountAsync(),
                SubscriptionsCount = await _subscriptionRepository.GetCountAsync(),
                ContactFormCount   = await _contactFormRepository.GetCountAsync(),
                ComplaintsCount    = await _complaintRepository.GetComplaintsCountAsync(),
                FirstName          = user.FirstName,
                LastName           = user.LastName,
                Email       = user.Email,
                PhoneNumber = user.PhoneNumber
            };

            return(View(model));
        }