File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
docs2/pages/ef-docs/documentations/query-db-set-filter/options Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ Permalink : ef6-query-db-set-filter-by-as-no-filter
3+ ---
4+
5+ # EF+ Query Filter AsNoFilter
6+
7+ You can bypass all filters by using AsNoFilter method in a query if a special scenario doesn't require filtering.
8+
9+ {% include template-example.html %}
10+ ``` csharp
11+
12+ // using Z.EntityFramework.Plus; // Don't forget to include this.
13+ var ctx = new EntitiesContext ();
14+
15+ this .DbSetFilter <Customer >(q => q .Where (x => x .IsActive ));
16+
17+ // SELECT * FROM Customer WHERE IsActive = true
18+ var list = ctx .Customers .ToList ();
19+
20+ // SELECT * FROM Customer
21+ var list = ctx .Customers .AsNoDbSetFilter ().ToList ();
22+
23+ ```
24+ [ Try it] ( https://dotnetfiddle.net/ZIA1kt )
You can’t perform that action at this time.
0 commit comments