Skip to content

Commit

Permalink
Pass useContextConnection to extension methods
Browse files Browse the repository at this point in the history
  • Loading branch information
redbaty committed Oct 2, 2023
1 parent ca0e343 commit c8a36a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions PgBulk.EFCore/ContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ namespace PgBulk.EFCore;

public static class ContextExtensions
{
public static Task BulkSyncAsync<T>(this DbContext dbContext, IEnumerable<T> entities, string? deleteWhere = null, int? timeoutOverride = 600) where T : class
public static Task BulkSyncAsync<T>(this DbContext dbContext, IEnumerable<T> entities, string? deleteWhere = null, int? timeoutOverride = 600, bool useContextConnection = true) where T : class
{
var @operator = new BulkEfOperator(dbContext, timeoutOverride);
var @operator = new BulkEfOperator(dbContext, timeoutOverride, useContextConnection);
return @operator.SyncAsync(entities, deleteWhere);
}

public static Task BulkMergeAsync<T>(this DbContext dbContext, IEnumerable<T> entities, int? timeoutOverride = 600) where T : class
public static Task BulkMergeAsync<T>(this DbContext dbContext, IEnumerable<T> entities, int? timeoutOverride = 600, bool useContextConnection = true) where T : class
{
var @operator = new BulkEfOperator(dbContext, timeoutOverride);
var @operator = new BulkEfOperator(dbContext, timeoutOverride, useContextConnection);
return @operator.MergeAsync(entities);
}

public static Task BulkInsertAsync<T>(this DbContext dbContext, IEnumerable<T> entities, int? timeoutOverride = 600) where T : class
public static Task BulkInsertAsync<T>(this DbContext dbContext, IEnumerable<T> entities, int? timeoutOverride = 600, bool useContextConnection = true) where T : class
{
var @operator = new BulkEfOperator(dbContext, timeoutOverride);
var @operator = new BulkEfOperator(dbContext, timeoutOverride, useContextConnection);
return @operator.InsertAsync(entities);
}

Expand Down
2 changes: 1 addition & 1 deletion PgBulk.EFCore/PgBulk.EFCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
<PackageProjectUrl>https://github.com/redbaty/PgBulk</PackageProjectUrl>
<PackageVersion>1.1.8</PackageVersion>
<PackageVersion>1.1.9</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit c8a36a5

Please sign in to comment.