[BUG] _repository.PaginatedListAsync with spec error
gmbeas opened this issue · comments
Hello, I'm trying to use it, but it gives me an error, is it because the field I want to search or filter is a list?
PARAMETER
{"advancedSearch":{"fields":["otherDocuments.ref"],"keyword":"20"},"keyword":"7778","pageNumber":0,"pageSize":10,"orderBy":["xml descending"],]}}
`public class AllDocumentsBySearchRequestSpec : EntitiesByPaginationFilterSpec<Documents, AllDocumentsResponse>
{
public AllFacturasdBySearchRequestSpec(AllFacturasRequest request)
: base(request) =>
Query
.Include(x => x.OtherDocuments) //List<OtherDocuments>
.OrderBy(c => c.ExisteXml, !request.HasOrderBy())
;
}`
var spec = new AllDocumentsdBySearchRequestSpec(request); return await _repository.PaginatedListAsync(spec, request.PageNumber, request.PageSize, cancellationToken: cancellationToken);
ERROR:
at System.Linq.Expressions.Expression.PropertyOrField(Expression expression, String propertyOrFieldName) at Application.Common.Specification.SpecificationBuilderExtensions.GetPropertyExpression(String propertyName, ParameterExpression parameter)