Skip to content

using Filters in Collection #115

Answered by alirezanet
Mr-Mohammad asked this question in Q&A
Discussion options

You must be logged in to vote

so you are trying to create an expression on the third level which is not easily possible, In these scenarios, you should start your query in reverse order to access the target properties: e.g.:

_dbContext.Companies..Gridify(gquery)
_dbContext.ApplicantDocument.Gridify(gquery)

or you can use GridifyMapper to map your third-level objects to a string:

e.g:

// how to map the third level objects depends on your model relationship 
var mapper = new GridifyMapper<WorkFlowTask>(true)
         .AddMap("jnc", v => v.ApplicantDocument.Companies.Select(w=> w.JuridicalNationalCode));
    
   var res = _dbContext.WorkFlowTask.Include(x => x.workFlow).ThenInclude(x => x.ApplicantDocument).ThenInclude(c=>c

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Mr-Mohammad
Comment options

@alirezanet
Comment options

Answer selected by alirezanet
@alirezanet
Comment options

@Mr-Mohammad
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants