-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathIBulkInsertProvider.cs
More file actions
42 lines (37 loc) · 1.24 KB
/
IBulkInsertProvider.cs
File metadata and controls
42 lines (37 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using Microsoft.EntityFrameworkCore;
using PhenX.EntityFrameworkCore.BulkInsert.Options;
namespace PhenX.EntityFrameworkCore.BulkInsert.Abstractions;
/// <summary>
/// Internal bulk insert provider interface.
/// </summary>
internal interface IBulkInsertProvider
{
/// <summary>
/// Calls the provider to perform a bulk insert operation.
/// </summary>
internal Task<List<T>> BulkInsertReturnEntities<T>(
bool sync,
DbContext context,
IEnumerable<T> entities,
BulkInsertOptions options,
OnConflictOptions? onConflict = null,
CancellationToken ctk = default
)
where T : class;
/// <summary>
/// Calls the provider to perform a bulk insert operation without returning the inserted entities.
/// </summary>
internal Task BulkInsert<T>(
bool sync,
DbContext context,
IEnumerable<T> entities,
BulkInsertOptions options,
OnConflictOptions? onConflict = null,
CancellationToken ctk = default
)
where T : class;
/// <summary>
/// Make the default options for the provider, can be a subclass of <see cref="BulkInsertOptions"/>.
/// </summary>
internal BulkInsertOptions InternalGetDefaultOptions();
}