Skip to content

Commit 4bc67eb

Browse files
Merge pull request #509 from waqasm78/master
Update batch-delete.md
2 parents c451ea1 + 01e5723 commit 4bc67eb

File tree

8 files changed

+31
-30
lines changed

8 files changed

+31
-30
lines changed

docs2/pages/documentations/batch-delete.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
2323
.Delete(x => x.BatchSize = 1000);
2424

2525
```
26-
{% include component-try-it.html href='https://dotnetfiddle.net/R6D5BX' %}
26+
[Try it in EF6](https://dotnetfiddle.net/R6D5BX) | [Try it in EF Core](https://dotnetfiddle.net/8qqyPw)
2727

2828
## Batch Delete
2929

@@ -49,7 +49,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
4949
.Delete();
5050

5151
```
52-
{% include component-try-it.html href='https://dotnetfiddle.net/DTWmh1' %}
52+
[Try it in EF6](https://dotnetfiddle.net/DTWmh1) | [Try it in EF Core](https://dotnetfiddle.net/HQauA0)
5353

5454
## Batch DeleteAsync
5555

@@ -75,7 +75,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
7575
.DeleteAsync();
7676

7777
```
78-
{% include component-try-it.html href='https://dotnetfiddle.net/KUHvru' %}
78+
[Try it in EF6](https://dotnetfiddle.net/KUHvru) | [Try it in EF Core](https://dotnetfiddle.net/Xdxjg1)
7979

8080
## Batch Size
8181

@@ -99,7 +99,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
9999
.Delete(x => x.BatchSize = 1000);
100100

101101
```
102-
{% include component-try-it.html href='https://dotnetfiddle.net/c6TLU3' %}
102+
[Try it in EF6](https://dotnetfiddle.net/c6TLU3) | [Try it in EF Core](https://dotnetfiddle.net/CpzGUz)
103103

104104
## Batch Delay Interval
105105

@@ -124,7 +124,8 @@ ctx.Users.Where(x => x.LastLoginDate < date)
124124
.Delete(x => x.BatchDelayInterval = 2000);
125125

126126
```
127-
{% include component-try-it.html href='https://dotnetfiddle.net/to4sjm' %}
127+
[Try it in EF6](https://dotnetfiddle.net/to4sjm) | [Try it in EF Core](https://dotnetfiddle.net/3iRApA
128+
)
128129

129130
## Executing Interceptor
130131

@@ -148,7 +149,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
148149
.Delete(x => { x.Executing = command => commandText = command.CommandText; });
149150

150151
```
151-
{% include component-try-it.html href='https://dotnetfiddle.net/VOEdOD' %}
152+
[Try it in EF6](https://dotnetfiddle.net/VOEdOD) | [Try it in EF Core](https://dotnetfiddle.net/KrtT0e)
152153

153154
## EF Core InMemory
154155

docs2/pages/documentations/batch-update.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
1919
.Update(x => new User() { IsSoftDeleted = 1 });
2020

2121
```
22-
{% include component-try-it.html href='https://dotnetfiddle.net/uzsdub' %}
22+
[Try it in EF6](https://dotnetfiddle.net/uzsdub) | [Try it in EF Core](https://dotnetfiddle.net/0CBNK1)
2323

2424
## Batch Update
2525

@@ -42,7 +42,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
4242
.Update(x => new User() { IsSoftDeleted = 1 });
4343

4444
```
45-
{% include component-try-it.html href='https://dotnetfiddle.net/sfMLRj' %}
45+
[Try it in EF6](https://dotnetfiddle.net/sfMLRj) | [Try it in EF Core](https://dotnetfiddle.net/kJRdnp)
4646

4747
## Batch UpdateAsync
4848

@@ -65,7 +65,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
6565
.UpdateAsync(x => new User() { IsSoftDeleted = 1 });
6666

6767
```
68-
{% include component-try-it.html href='https://dotnetfiddle.net/7fHg1g' %}
68+
[Try it in EF6](https://dotnetfiddle.net/7fHg1g) | [Try it in EF Core](https://dotnetfiddle.net/TBfvz6)
6969

7070
## Executing Interceptor
7171

@@ -89,7 +89,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
8989
x => { x.Executing = command => commandText = command.CommandText; });
9090

9191
```
92-
{% include component-try-it.html href='https://dotnetfiddle.net/a6zJUe' %}
92+
[Try it in EF6](https://dotnetfiddle.net/a6zJUe) | [Try it in EF Core](https://dotnetfiddle.net/oHJl9R)
9393

9494
## Limitations
9595

docs2/pages/documentations/linq-dynamic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var list = ctx.Where(x => "x > 2").ToList();
3333
var list = ctx.Where(x => "x > y", new { y = 2 }).ToList();
3434

3535
```
36-
{% include component-try-it.html href='https://dotnetfiddle.net/Otm0Aa' %}
36+
[Try it in EF6](https://dotnetfiddle.net/Otm0Aa) | [Try it in EF Core](https://dotnetfiddle.net/1sTQwA)
3737

3838
## Order && Select
3939

@@ -53,7 +53,7 @@ var list = context.Customers.OrderByDescendingDynamic(x => "x.Name").ToList();
5353
var list = context.Customers.SelectDynamic(x => "x.Name").ToList();
5454

5555
```
56-
{% include component-try-it.html href='https://dotnetfiddle.net/OJjBgK' %}
56+
[Try it in EF6](https://dotnetfiddle.net/OJjBgK) | [Try it in EF Core](https://dotnetfiddle.net/8n2Xc0)
5757

5858
## Execute
5959

@@ -69,4 +69,4 @@ var list = ctx.Execute<IEnumerable<int>>("Where(x => x > 2)");
6969
var list3 = ctx.Execute("Where(x => x > y).OrderBy(x => x).ToList()", new { y = 2 });
7070

7171
```
72-
{% include component-try-it.html href='https://dotnetfiddle.net/mwTqW7' %}
72+
[Try it in EF6](https://dotnetfiddle.net/mwTqW7) | [Try it in EF Core](https://dotnetfiddle.net/LbU2at)

docs2/pages/documentations/query-cache.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var countries1 = ctx.Countries.FromCache().ToList();
2525
var countries2 = ctx.Countries.FromCache().ToList();
2626

2727
```
28-
{% include component-try-it.html href='https://dotnetfiddle.net/nx9A2H' %}
28+
[Try it in EF6](https://dotnetfiddle.net/nx9A2H) | [Try it in EF Core](https://dotnetfiddle.net/EZZkhP)
2929

3030
## EF+ Query Cache
3131

@@ -44,7 +44,7 @@ var countries = ctx.Countries.Where(x => x.IsActive).FromCache();
4444
var states = ctx.States.Where(x => x.IsActive).FromCache(DateTime.Now.AddHours(2));
4545

4646
```
47-
{% include component-try-it.html href='https://dotnetfiddle.net/BcScGT' %}
47+
[Try it in EF6](https://dotnetfiddle.net/BcScGT) | [Try it in EF Core](https://dotnetfiddle.net/z5gyPI)
4848

4949
## EF+ Query Cache Async
5050

@@ -79,7 +79,7 @@ var count = ctx.Customers.Count();
7979
// Oops! All customers are cached instead of customer count.
8080
var count = ctx.Customers.FromCache().Count();
8181
```
82-
{% include component-try-it.html href='https://dotnetfiddle.net/SOjxeY' %}
82+
[Try it in EF6](https://dotnetfiddle.net/SOjxeY) | [Try it in EF Core](https://dotnetfiddle.net/3EXZBt)
8383

8484
**EF+ Query Deferred** has been created to resolve this issue, the resolution is now deferred instead of being immediate which lets us cache the expected result.
8585

@@ -92,7 +92,7 @@ var ctx = new EntitiesContext();
9292
var count = ctx.Customers.DeferredCount().FromCache();
9393

9494
```
95-
{% include component-try-it.html href='https://dotnetfiddle.net/4MUlef' %}
95+
[Try it in EF6](https://dotnetfiddle.net/4MUlef) | [Try it in EF Core](https://dotnetfiddle.net/V0G6pe)
9696

9797
Query Deferred supports all Queryable extension methods and overloads.
9898

@@ -117,7 +117,7 @@ QueryCacheManager.ExpireTag("countries");
117117
:bulb: Use Enum instead of hard-coding string for tag name.
118118

119119
```
120-
{% include component-try-it.html href='https://dotnetfiddle.net/RScINk' %}
120+
[Try it in EF6](https://dotnetfiddle.net/RScINk) | [Try it in EF Core](https://dotnetfiddle.net/PUQCCY)
121121
122122
## EF+ Query Cache Expiration
123123

@@ -139,7 +139,7 @@ var options = new MemoryCacheEntryOptions() { SlidingExpiration = TimeSpan.FromH
139139
var states = ctx.States.FromCache(options);
140140

141141
```
142-
{% include component-try-it.html href='https://dotnetfiddle.net/f57ZoI' %}
142+
[Try it in EF6](https://dotnetfiddle.net/f57ZoI)
143143
144144
## EF Query Cache Control
145145

@@ -157,7 +157,7 @@ QueryCacheManager.Cache = MemoryCache.Default;
157157
QueryCacheManager.Cache = new MemoryCache(new MemoryCacheOptions());
158158

159159
```
160-
{% include component-try-it.html href='https://dotnetfiddle.net/mIhcff' %}
160+
[Try it in EF6](https://dotnetfiddle.net/mIhcff) | [Try it in EF Core](https://dotnetfiddle.net/6ISVBT)
161161
162162
You can set default policy
163163

@@ -173,7 +173,7 @@ var options = new MemoryCacheEntryOptions() { SlidingExpiration = TimeSpan.FromH
173173
QueryCacheManager.DefaultMemoryCacheEntryOptions = options;
174174

175175
```
176-
{% include component-try-it.html href='https://dotnetfiddle.net/7JptcT' %}
176+
[Try it in EF6](https://dotnetfiddle.net/7JptcT)
177177
178178
## Real Life Scenarios
179179

docs2/pages/documentations/query-deferred.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var count = ctx.Customers.Count();
2222
var count = ctx.Customers.FromCache().Count();
2323

2424
```
25-
{% include component-try-it.html href='https://dotnetfiddle.net/WgpFfH' %}
25+
[Try it in EF6](https://dotnetfiddle.net/WgpFfH) | [Try it in EF Core](https://dotnetfiddle.net/cu3UiE)
2626

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

@@ -36,7 +36,7 @@ var ctx = new EntitiesContext();
3636
var count = ctx.Customers.DeferredCount().FromCache();
3737

3838
```
39-
{% include component-try-it.html href='https://dotnetfiddle.net/ZChhmD' %}
39+
[Try it in EF6](https://dotnetfiddle.net/ZChhmD) | [Try it in EF Core](https://dotnetfiddle.net/xIz5wx)
4040

4141
#### All LINQ IQueryable extension methods and overloads are supported:
4242

@@ -77,7 +77,7 @@ ctx.Customers.DeferredCount().FromCache();
7777
ctx.Customers.DeferredCount().FutureValue();
7878

7979
```
80-
{% include component-try-it.html href='https://dotnetfiddle.net/5KcNj3' %}
80+
[Try it in EF6](https://dotnetfiddle.net/5KcNj3) | [Try it in EF Core](https://dotnetfiddle.net/ohLJL3)
8181

8282
## EF+ Query Deferred Execute
8383

@@ -93,7 +93,7 @@ var countDeferred = ctx.Customers.DeferredCount();
9393
var count = countDeferred.Execute();
9494

9595
```
96-
{% include component-try-it.html href='https://dotnetfiddle.net/sXOfNB' %}
96+
[Try it in EF6](https://dotnetfiddle.net/sXOfNB) | [Try it in EF Core](https://dotnetfiddle.net/Ou2Ly4)
9797

9898
## EF+ Query Deferred Execute Async
9999

docs2/pages/getting-started/tutorial-audit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ foreach(var entry in entries)
3535
}
3636

3737
```
38-
{% include component-try-it.html href='https://dotnetfiddle.net/89tii1' %}
38+
[Try it in EF6](https://dotnetfiddle.net/89tii1) | [Try it in EF Core](https://dotnetfiddle.net/LPZvLa)
3939

4040
AutoSave audit in your database
4141

@@ -45,7 +45,7 @@ AuditManager.DefaultConfiguration.AutoSavePreAction = (context, audit) =>
4545
(context as EntityContext).AuditEntries.AddRange(audit.Entries);
4646

4747
```
48-
{% include component-try-it.html href='https://dotnetfiddle.net/rRORzM' %}
48+
[Try it in EF6](https://dotnetfiddle.net/rRORzM) | [Try it in EF Core](https://dotnetfiddle.net/DeLrTJ)
4949

5050
***Support:** EF5, EF6, EF Core*
5151

docs2/pages/getting-started/tutorial-batch-operations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
1919
.Delete(x => x.BatchSize = 1000);
2020

2121
```
22-
{% include component-try-it.html href='https://dotnetfiddle.net/asjI4U' %}
22+
[Try it in EF6](https://dotnetfiddle.net/asjI4U) | [Try it in EF Core](https://dotnetfiddle.net/KMgmZs)
2323

2424
***Support:** EF5, EF6, EF Core*
2525

@@ -39,7 +39,7 @@ ctx.Users.Where(x => x.LastLoginDate < date)
3939
.Update(x => new User() { IsSoftDeleted = 1 });
4040

4141
```
42-
{% include component-try-it.html href='https://dotnetfiddle.net/cV3IHD' %}
42+
[Try it in EF6](https://dotnetfiddle.net/cV3IHD) | [Try it in EF Core](https://dotnetfiddle.net/KMgmZs)
4343

4444
***Support:** EF5, EF6, EF Core*
4545

docs2/pages/getting-started/tutorial-linq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ var list = ctx.Where(x => "x > 2").ToList();
3232
var list = ctx.Where(x => "x > y", new { y = 2 }).ToList();
3333

3434
```
35-
{% include component-try-it.html href='https://dotnetfiddle.net/iSnS3l' %}
35+
[Try it in EF6](https://dotnetfiddle.net/iSnS3l) | [Try it in EF Core](https://dotnetfiddle.net/96FCM6)
3636

3737
[Learn more](/linq-dynamic)

0 commit comments

Comments
 (0)