Skip to content

Commit 4a3e259

Browse files
committed
docs
1 parent 1957bcd commit 4a3e259

3 files changed

Lines changed: 39 additions & 41 deletions

File tree

readme.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,19 @@ application.UseDelta(
396396
<!-- endSnippet -->
397397

398398

399+
### GetLastTimeStamp
400+
401+
For a `DbConnection`:
402+
403+
<!-- snippet: GetLastTimeStampConnection -->
404+
<a id='snippet-GetLastTimeStampConnection'></a>
405+
```cs
406+
var timeStamp = await connection.GetLastTimeStamp();
407+
```
408+
<sup><a href='/src/DeltaTests/Usage.cs#L188-L192' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetLastTimeStampConnection' title='Start of snippet'>anchor</a></sup>
409+
<!-- endSnippet -->
410+
411+
399412
## EF Usage
400413

401414

@@ -542,6 +555,17 @@ app.UseDelta<SampleDbContext>(
542555
<!-- endSnippet -->
543556

544557

558+
### GetLastTimeStamp:
559+
560+
<!-- snippet: GetLastTimeStampEF -->
561+
<a id='snippet-GetLastTimeStampEF'></a>
562+
```cs
563+
var timeStamp = await dbContext.GetLastTimeStamp();
564+
```
565+
<sup><a href='/src/Delta.EFTests/Usage.cs#L41-L45' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetLastTimeStampEF' title='Start of snippet'>anchor</a></sup>
566+
<!-- endSnippet -->
567+
568+
545569
## UseResponseDiagnostics
546570

547571
Response diagnostics is an opt-out feature that includes extra log information in the response headers.
@@ -570,31 +594,6 @@ A set of helper methods for working with [SQL Server Change Tracking](https://le
570594
Nuget: [Delta.SqlServer](https://www.nuget.org/packages/Delta.SqlServer)
571595

572596

573-
### GetLastTimeStamp
574-
575-
576-
#### For a `SqlConnection`:
577-
578-
<!-- snippet: GetLastTimeStampSqlConnection -->
579-
<a id='snippet-GetLastTimeStampSqlConnection'></a>
580-
```cs
581-
var timeStamp = await sqlConnection.GetLastTimeStamp();
582-
```
583-
<sup><a href='/src/DeltaTests/Usage.cs#L188-L192' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetLastTimeStampSqlConnection' title='Start of snippet'>anchor</a></sup>
584-
<!-- endSnippet -->
585-
586-
587-
#### For a `DbContext`:
588-
589-
<!-- snippet: GetLastTimeStampEF -->
590-
<a id='snippet-GetLastTimeStampEF'></a>
591-
```cs
592-
var timeStamp = await dbContext.GetLastTimeStamp();
593-
```
594-
<sup><a href='/src/Delta.EFTests/Usage.cs#L41-L45' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetLastTimeStampEF' title='Start of snippet'>anchor</a></sup>
595-
<!-- endSnippet -->
596-
597-
598597
### GetDatabasesWithTracking
599598

600599
Get a list of all databases with change tracking enabled.

readme.source.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ To use custom connection and transaction discovery:
199199
snippet: CustomDiscoveryConnectionAndTransaction
200200

201201

202+
### GetLastTimeStamp
203+
204+
For a `DbConnection`:
205+
206+
snippet: GetLastTimeStampConnection
207+
208+
202209
## EF Usage
203210

204211

@@ -243,6 +250,11 @@ Optionally control what requests Delta is executed on.
243250
snippet: ShouldExecuteEF
244251

245252

253+
### GetLastTimeStamp:
254+
255+
snippet: GetLastTimeStampEF
256+
257+
246258
## UseResponseDiagnostics
247259

248260
Response diagnostics is an opt-out feature that includes extra log information in the response headers.
@@ -265,19 +277,6 @@ A set of helper methods for working with [SQL Server Change Tracking](https://le
265277
Nuget: [Delta.SqlServer](https://www.nuget.org/packages/Delta.SqlServer)
266278

267279

268-
### GetLastTimeStamp
269-
270-
271-
#### For a `SqlConnection`:
272-
273-
snippet: GetLastTimeStampSqlConnection
274-
275-
276-
#### For a `DbContext`:
277-
278-
snippet: GetLastTimeStampEF
279-
280-
281280
### GetDatabasesWithTracking
282281

283282
Get a list of all databases with change tracking enabled.

src/DeltaTests/Usage.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ public async Task GetLastTimeStampSqlServer([Values] bool tracking)
183183
await database.Connection.EnableTracking();
184184
}
185185

186-
var sqlConnection = database.Connection;
186+
var connection = database.Connection;
187187

188-
#region GetLastTimeStampSqlConnection
188+
#region GetLastTimeStampConnection
189189

190-
var timeStamp = await sqlConnection.GetLastTimeStamp();
190+
var timeStamp = await connection.GetLastTimeStamp();
191191

192192
#endregion
193193

0 commit comments

Comments
 (0)