Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] _repository.PaginatedListAsync with spec error #890

Open
gmbeas opened this issue Sep 11, 2023 · 0 comments
Open

[BUG] _repository.PaginatedListAsync with spec error #890

gmbeas opened this issue Sep 11, 2023 · 0 comments

Comments

@gmbeas
Copy link

gmbeas commented Sep 11, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant