コード例 #1
0
        public async Task <NotificationFilterDto> SearchNotifications(NotificationFilterDto model)
        {
            var expression = GetSearchExpressionNotifications(model);

            (var query, int totalCount) = await AuditUnitOfWork.NotificationRepository.GetPagedByFiltersAsync(
                model.PageNumber,
                model.jtPageSize.Value,
                expression,
                a => a.OrderByDescending(d => d.Date));

            model.Items = query.Select(notification => NotificationMapper.MapToDto(notification)).ToList();

            model.TotalCount = totalCount;

            return(model);
        }