Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit f5c9e8f

Browse files
committed
Change InsertAsync to use EnableI/DisabledentityInsertAsync
1 parent cd7c790 commit f5c9e8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.OrmLite/Async/OrmLiteWriteCommandExtensionsAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ internal static async Task<long> InsertAsync<T>(this IDbCommand dbCmd, Dictionar
310310
try
311311
{
312312
if (enableIdentityInsert)
313-
dialectProvider.EnableIdentityInsert<T>(dbCmd);
313+
await dialectProvider.EnableIdentityInsertAsync<T>(dbCmd, token);
314314

315315
dialectProvider.PrepareParameterizedInsertStatement<T>(dbCmd,
316316
insertFields: dialectProvider.GetNonDefaultValueInsertFields<T>(obj),
@@ -324,7 +324,7 @@ internal static async Task<long> InsertAsync<T>(this IDbCommand dbCmd, Dictionar
324324
finally
325325
{
326326
if (enableIdentityInsert)
327-
dialectProvider.DisableIdentityInsert<T>(dbCmd);
327+
await dialectProvider.DisableIdentityInsertAsync<T>(dbCmd, token);
328328
}
329329
}
330330

0 commit comments

Comments
 (0)