public async Task <Pagination <SystemConfigDto> > GetPaginationAsync(DataManager dataManager) { using (_dbContextScopeFactory.CreateReadOnly()) { int count = _systemConfigRepository.GetAll().ExecuteCount(dataManager); List <SystemConfigDto> systemConfigs = new List <SystemConfigDto>(); if (count > 0) { systemConfigs = await _systemConfigRepository .Query <SystemConfigDto>().Execute(dataManager) .ToListAsync(); } return(new Pagination <SystemConfigDto>(count, systemConfigs)); } }