Skip to content

Commit f685352

Browse files
authored
Create ef6-query-include-optimized-filter.md
1 parent ac69193 commit f685352

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
Permalink: ef6-query-include-optimized-filter
3+
---
4+
5+
# EF+ Query IncludeOptimized Filter
6+
7+
Same as with EF+ Query IncludeFilter, it is possible to filter which related entities to load and then to launch a query.
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+
var orders = ctx.Orders.IncludeOptimized(x => x.Items.Where(y => y.IsActive));
16+
17+
```
18+
[Try it](https://dotnetfiddle.net/uFBqTO)

0 commit comments

Comments
 (0)