Skip to main content Link Menu Expand (external link) Document Search Copy Copied

IgnoreQueryFilters

Compatible with:

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.

Example

The following specification implements the IgnoreQueryFilters() expression:

public class CompanyByIdIgnoreQueryFilters : Specification<Company>, ISingleResultSpecification
{
  public CompanyByIdIgnoreQueryFilters(int id)
  {
    Query
      .Where(company => company.Id == id)
      .IgnoreQueryFilters();
  }
}