-
Notifications
You must be signed in to change notification settings - Fork 2k
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
query filters docs - using navigations in query filters + sample #2394
Conversation
@@ -39,6 +39,16 @@ The predicate expressions passed to the _HasQueryFilter_ calls will now automati | |||
> [!NOTE] | |||
> It is currently not possible to define multiple query filters on the same entity - only the last one will be applied. However, you can define a single filter with multiple conditions using the logical _AND_ operator ([`&&` in C#](https://docs.microsoft.com/dotnet/csharp/language-reference/operators/boolean-logical-operators#conditional-logical-and-operator-)). | |||
|
|||
## Use of navigations | |||
|
|||
Navigations can be used when defining global query filters. They are applied recursively - when navigations used in query filters are translated, query filters defined on referenced entities are also applied, potentially adding more navigations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I ditch the explanation what it means that we apply filters recursively? Sentence seems complicated to me, but it ties to the warning about cycles. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems okay to me.
1d9fc1f
to
3206b47
Compare
updated @JeremyLikness can you create a forward link that points to: https://docs.microsoft.com/en-us/ef/core/querying/filters |
> [!NOTE] | ||
> Currently EF Core does not detect cycles in global query filter definitions, so you should be careful when defining them. If specified incorrectly, this could lead to infinite loops during query translation. | ||
|
||
## Accessing entity with query filter using reqiured navigation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TMI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
ping |
- using navigations inside query filters, - using required navigations to acceess entity with query filter defined, - samples.
No description provided.