예제 #1
0
        public IActionResult ProviderList(int page = 1)
        {
            int pageSize = 8;

            var source = _userManagerService.AllProviderByRoleName("provider");
            var count  = source.Count();
            var items  = source.Skip((page - 1) * pageSize).Take(pageSize).ToList();

            PageViewModel         pageViewModel = new PageViewModel(count, page, pageSize);
            ProviderListViewModel viewModel     = new ProviderListViewModel()
            {
                PageViewModel = pageViewModel,
                Accounts      = items
            };

            return(View(viewModel));
        }