Skip to content

Commit d2be564

Browse files
Merge pull request #522 from waqasm78/master
Merge pull request #3 from zzzprojects/master
2 parents 4600ebf + 53f6407 commit d2be564

File tree

63 files changed

+1466
-1280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1466
-1280
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
- Batch Operations
2-
- [Batch Delete](ef-core-batch-delete.md)
3-
- [Batch Update](ef-core-batch-update.md)
2+
- [Batch Delete](documentations/batch-delete/ef-core-batch-delete.md)
3+
- [Batch Update](documentations/batch-update/ef-core-batch-update.md)
44
- Misc
5-
- [LINQ Dynamic](ef-core-linq-dynamic.md)
6-
- [Audit](ef-core-audit.md)
5+
- [LINQ Dynamic](documentations/linq-dynamic/ef-core-linq-dynamic.md)
6+
- [Audit](documentations/audit/ef-core-audit.md)
77
- Query
8-
- [Query Cache](ef-core-query-cache.md)
9-
- [Query Deferred](ef-core-query-deferred.md)
10-
- [Query Filter](ef-core-query-filter.md)
11-
- [Query Future](ef-core-query-future.md)
12-
- [Query IncludeFilter](ef-core-query-include-filter.md)
8+
- [Query Cache](documentations/query-cache/ef-core-query-cache.md)
9+
- [Query Deferred](documentations/query-deferred/ef-core-query-deferred.md)
10+
- [Query Filter](documentations/query-filter/ef-core-query-filter.md)
11+
- [Query Future](documentations/query-future/ef-core-query-future.md)
12+
- [Query IncludeFilter](documentations/query-include-filter/ef-core-query-include-filter.md)

docs2/pages/ef-core-docs/documentations/query-deferred/ef-core-query-deferred.md

Lines changed: 7 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var count = ctx.Customers.Count();
2626
var count = ctx.Customers.FromCache().Count();
2727

2828
```
29-
[Try it in EF6](https://dotnetfiddle.net/WgpFfH) | [Try it in EF Core](https://dotnetfiddle.net/cu3UiE)
29+
[Try it](https://dotnetfiddle.net/cu3UiE)
3030

3131
Here comes in play the deferred query which acts exactly like deferred methods, by modifying the query expression without resolving it.
3232

@@ -40,7 +40,7 @@ var ctx = new EntitiesContext();
4040
var count = ctx.Customers.DeferredCount().FromCache();
4141

4242
```
43-
[Try it in EF6](https://dotnetfiddle.net/ZChhmD) | [Try it in EF Core](https://dotnetfiddle.net/xIz5wx)
43+
[Try it](https://dotnetfiddle.net/xIz5wx)
4444

4545
#### All LINQ IQueryable extension methods and overloads are supported:
4646

@@ -64,59 +64,11 @@ var count = ctx.Customers.DeferredCount().FromCache();
6464
- DeferredSingleOrDefault
6565
- DeferredSum
6666

67-
## EF+ Query Deferred
68-
69-
Defer the execution of a query which is normally executed to allow some features like Query Cache and Query Future.
70-
71-
{% include template-example.html %}
72-
```csharp
73-
74-
// using Z.EntityFramework.Plus; // Don't forget to include this.
75-
var ctx = new EntitiesContext();
76-
77-
// Query Cache
78-
ctx.Customers.DeferredCount().FromCache();
79-
80-
// Query Future
81-
ctx.Customers.DeferredCount().FutureValue();
82-
83-
```
84-
[Try it in EF6](https://dotnetfiddle.net/5KcNj3) | [Try it in EF Core](https://dotnetfiddle.net/ohLJL3)
85-
86-
## EF+ Query Deferred Execute
87-
88-
Execute the deferred query and return the result.
89-
90-
{% include template-example.html %}
91-
```csharp
92-
93-
// using Z.EntityFramework.Plus; // Don't forget to include this.
94-
var ctx = new EntitiesContext();
95-
96-
var countDeferred = ctx.Customers.DeferredCount();
97-
var count = countDeferred.Execute();
98-
99-
```
100-
[Try it in EF6](https://dotnetfiddle.net/sXOfNB) | [Try it in EF Core](https://dotnetfiddle.net/Ou2Ly4)
101-
102-
## EF+ Query Deferred Execute Async
103-
104-
Execute the Deferred query asynchronously and return the result.
105-
106-
**ExecuteAsync** methods are available starting from .NET Framework 4.5 and support all the same options than **Execute** methods.
107-
108-
{% include template-example.html %}
109-
```csharp
110-
111-
// using Z.EntityFramework.Plus; // Don't forget to include this.
112-
var ctx = new EntitiesContext();
113-
114-
var countDeferred = ctx.Customers.DeferredCount();
115-
var taskCount = countDeferred.ExecuteAsync();
116-
117-
```
118-
[Try it in EF6](https://dotnetfiddle.net/0BpVn1) | [Try it in EF Core](https://dotnetfiddle.net/1pttmj)
67+
## Options
11968

69+
- [Using Query Cache and Query Future](options/ef-core-query-deferred-using-query-cache-and-query-future.md)
70+
- [Execute](options/ef-core-query-deferred-execute.md)
71+
12072
## Real Life Scenarios
12173

12274
EF Query Deferred brings advantages to other third party features:
@@ -138,7 +90,7 @@ None.
13890

13991
- **EF+ Query Deferred:** Full version or Standalone version
14092
- **Database Provider:** All supported
141-
- **Entity Framework Version:** EF5, EF6, EF Core
93+
- **Entity Framework Version:** EF Core
14294
- **Minimum Framework Version:** .NET Framework 4
14395

14496
## Conclusion
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
Permalink: ef-core-query-deferred-execute
3+
---
4+
5+
# EF+ Query Deferred Execute
6+
7+
Execute the deferred query and return the result.
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 countDeferred = ctx.Customers.DeferredCount();
16+
var count = countDeferred.Execute();
17+
18+
```
19+
[Try it](https://dotnetfiddle.net/Ou2Ly4)
20+
21+
## EF+ Query Deferred Execute Async
22+
23+
Execute the Deferred query asynchronously and return the result.
24+
25+
**ExecuteAsync** methods are available starting from .NET Framework 4.5 and support all the same options than **Execute** methods.
26+
27+
{% include template-example.html %}
28+
```csharp
29+
30+
// using Z.EntityFramework.Plus; // Don't forget to include this.
31+
var ctx = new EntitiesContext();
32+
33+
var countDeferred = ctx.Customers.DeferredCount();
34+
var taskCount = countDeferred.ExecuteAsync();
35+
36+
```
37+
[Try it](https://dotnetfiddle.net/1pttmj)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
Permalink: ef-core-query-deferred-using-query-cache-and-query-future
3+
---
4+
5+
# EF+ Query Deferred
6+
7+
Defer the execution of a query which is normally executed to allow some features like Query Cache and Query Future.
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+
// Query Cache
16+
ctx.Customers.DeferredCount().FromCache();
17+
18+
// Query Future
19+
ctx.Customers.DeferredCount().FutureValue();
20+
21+
```
22+
[Try it](https://dotnetfiddle.net/ohLJL3)

0 commit comments

Comments
 (0)