Filtering by collection with values of primitive types #141
Answered
by
alirezanet
uxohotteixo
asked this question in
Q&A
-
Hi @alirezanet! Please give me some advice. I want to filter on collections of primitive types Example:
Here I want to filter users by email list. That is, I want to get users who have specific emails. Using LINQ a query looks something like this:
How can I do this using Gridify? |
Beta Was this translation helpful? Give feedback.
Answered by
alirezanet
Nov 22, 2023
Replies: 1 comment 1 reply
-
Hi @uxohotteixo, Maybe try something like this: query = new QueryBuilder<User>()
.AddMap("email", q => q.Emails.Select(q => q)) // you can also use GridifyMapper AddMap method
.AddCondition("email =* [email protected], email =* secondEmail.test.com") // this is also same as AddFiltering extension
.Build(query); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
uxohotteixo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @uxohotteixo,
Maybe try something like this: