コード例 #1
0
 public async Task <Pagination <NotificationTypeDto> > GetPaginationAsync(DataManager dataManager)
 {
     using (_dbContextScopeFactory.CreateReadOnly())
     {
         int count = _notificationTypeRepository.GetAll().ExecuteCount(dataManager);
         List <NotificationTypeDto> notificationTypes = new List <NotificationTypeDto>();
         if (count > 0)
         {
             notificationTypes = await _notificationTypeRepository.Query <NotificationTypeDto>().Execute(dataManager).ToListAsync();
         }
         return(new Pagination <NotificationTypeDto>(count, notificationTypes));
     }
 }