9191 select cast (@timeStamp as varchar ) + '-' + cast (@changeTracking as varchar )
9292```
9393< sup >< a href = '/src/Delta/DeltaExtensions_Sql.cs#L46-L54' title = 'Snippet source file' > snippet source < / a > | < a href = '#snippet-SqlServerTimestamp' title = 'Start of snippet' > anchor < / a >< / sup >
94- < a id = 'snippet-SqlServerTimestamp-1' >< / a >
95- ```cs
96- declare @changeTracking bigint = change_tracking_current_version ();
97- declare @timeStamp bigint = convert (bigint , @@dbts );
98-
99- if (@changeTracking is null )
100- select cast (@timeStamp as varchar )
101- else
102- select cast (@timeStamp as varchar ) + '-' + cast (@changeTracking as varchar )
103- ```
104- < sup >< a href = '/src/DeltaTests/Usage.cs#L71-L79' title = 'Snippet source file' > snippet source < / a > | < a href = '#snippet-SqlServerTimestamp-1' title = 'Start of snippet' > anchor < / a >< / sup >
10594< ! -- endSnippet -- >
10695
10796
@@ -346,7 +335,7 @@ var application = webApplicationBuilder.Build();
346335application .UseDelta (
347336 getConnection : httpContext => httpContext .RequestServices .GetRequiredService <SqlConnection >());
348337```
349- <sup ><a href =' /src/DeltaTests/Usage.cs#L295-L301 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-CustomDiscoveryConnection ' title =' Start of snippet ' >anchor</a ></sup >
338+ <sup ><a href =' /src/DeltaTests/Usage.cs#L252-L258 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-CustomDiscoveryConnection ' title =' Start of snippet ' >anchor</a ></sup >
350339<!-- endSnippet -->
351340
352341To use custom connection and transaction discovery:
@@ -364,7 +353,7 @@ webApplication.UseDelta(
364353 return new (sqlConnection , sqlTransaction );
365354 });
366355```
367- <sup ><a href =' /src/DeltaTests/Usage.cs#L306-L318 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-CustomDiscoveryConnectionAndTransaction ' title =' Start of snippet ' >anchor</a ></sup >
356+ <sup ><a href =' /src/DeltaTests/Usage.cs#L263-L275 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-CustomDiscoveryConnectionAndTransaction ' title =' Start of snippet ' >anchor</a ></sup >
368357<!-- endSnippet -->
369358
370359
@@ -551,7 +540,7 @@ Nuget: [Delta.SqlServer](https://www.nuget.org/packages/Delta.SqlServer)
551540``` cs
552541var timeStamp = await sqlConnection .GetLastTimeStamp ();
553542```
554- <sup ><a href =' /src/DeltaTests/Usage.cs#L134-L138 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-GetLastTimeStampSqlConnection ' title =' Start of snippet ' >anchor</a ></sup >
543+ <sup ><a href =' /src/DeltaTests/Usage.cs#L91-L95 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-GetLastTimeStampSqlConnection ' title =' Start of snippet ' >anchor</a ></sup >
555544<!-- endSnippet -->
556545
557546
@@ -579,7 +568,7 @@ foreach (var db in trackedDatabases)
579568 Trace .WriteLine (db );
580569}
581570```
582- <sup ><a href =' /src/DeltaTests/Usage.cs#L193-L201 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-GetDatabasesWithTracking ' title =' Start of snippet ' >anchor</a ></sup >
571+ <sup ><a href =' /src/DeltaTests/Usage.cs#L150-L158 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-GetDatabasesWithTracking ' title =' Start of snippet ' >anchor</a ></sup >
583572<!-- endSnippet -->
584573
585574Uses the following SQL:
@@ -609,7 +598,7 @@ foreach (var db in trackedTables)
609598 Trace .WriteLine (db );
610599}
611600```
612- <sup ><a href =' /src/DeltaTests/Usage.cs#L219-L227 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-GetTrackedTables ' title =' Start of snippet ' >anchor</a ></sup >
601+ <sup ><a href =' /src/DeltaTests/Usage.cs#L176-L184 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-GetTrackedTables ' title =' Start of snippet ' >anchor</a ></sup >
613602<!-- endSnippet -->
614603
615604Uses the following SQL:
@@ -634,7 +623,7 @@ Determine if change tracking is enabled for a database.
634623```cs
635624var isTrackingEnabled = await sqlConnection .IsTrackingEnabled ();
636625```
637- <sup ><a href =' /src/DeltaTests/Usage.cs#L284-L288 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-IsTrackingEnabled ' title =' Start of snippet ' >anchor</a ></sup >
626+ <sup ><a href =' /src/DeltaTests/Usage.cs#L241-L245 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-IsTrackingEnabled ' title =' Start of snippet ' >anchor</a ></sup >
638627<!-- endSnippet -->
639628
640629Uses the following SQL:
@@ -661,7 +650,7 @@ Enable change tracking for a database.
661650```cs
662651await sqlConnection .EnableTracking ();
663652```
664- <sup ><a href =' /src/DeltaTests/Usage.cs#L278-L282 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-EnableTracking ' title =' Start of snippet ' >anchor</a ></sup >
653+ <sup ><a href =' /src/DeltaTests/Usage.cs#L235-L239 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-EnableTracking ' title =' Start of snippet ' >anchor</a ></sup >
665654<!-- endSnippet -->
666655
667656Uses the following SQL:
@@ -689,7 +678,7 @@ Disable change tracking for a database and all tables within that database.
689678```cs
690679await sqlConnection .DisableTracking ();
691680```
692- <sup ><a href =' /src/DeltaTests/Usage.cs#L263-L267 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-DisableTracking ' title =' Start of snippet ' >anchor</a ></sup >
681+ <sup ><a href =' /src/DeltaTests/Usage.cs#L220-L224 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-DisableTracking ' title =' Start of snippet ' >anchor</a ></sup >
693682<!-- endSnippet -->
694683
695684Uses the following SQL:
@@ -726,7 +715,7 @@ Enables change tracking for all tables listed, and disables change tracking for
726715``` cs
727716await sqlConnection .SetTrackedTables ([" Companies" ]);
728717```
729- <sup ><a href =' /src/DeltaTests/Usage.cs#L213-L217 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-SetTrackedTables ' title =' Start of snippet ' >anchor</a ></sup >
718+ <sup ><a href =' /src/DeltaTests/Usage.cs#L170-L174 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-SetTrackedTables ' title =' Start of snippet ' >anchor</a ></sup >
730719<!-- endSnippet -->
731720
732721Uses the following SQL:
0 commit comments