-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ardalis/doc ignorequeryfilters (#212)
* clean up files; add doc for ignorequeryfilters * update nav_orders
- Loading branch information
Showing
6 changed files
with
31 additions
and
121 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
layout: default | ||
title: IgnoreQueryFilters | ||
nav_order: 3 | ||
has_children: false | ||
parent: ORM-Specific Features | ||
grand_parent: Features | ||
--- | ||
|
||
# IgnoreQueryFilters | ||
|
||
The `IgnoreQueryFilters` feature is used to indicate to EF Core (it is not supported by EF 6) that it should ignore global query filters for this query. It simply passes along this call to the underlying [EF Core feature for disabling global filters](https://docs.microsoft.com/ef/core/querying/filters#disabling-filters). | ||
|
||
## Sample | ||
|
||
The following specification implements the `IgnoreQueryFilters()` expression: | ||
|
||
```csharp | ||
public class CompanyByIdIgnoreQueryFilters : Specification<Company>, ISingleResultSpecification | ||
{ | ||
public CompanyByIdIgnoreQueryFilters(int id) | ||
{ | ||
Query | ||
.Where(company => company.Id == id) | ||
.IgnoreQueryFilters(); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters