Skip to content

Commit da6b8c1

Browse files
committed
DefaultOptions
1 parent 7b28b77 commit da6b8c1

File tree

12 files changed

+18
-6
lines changed

12 files changed

+18
-6
lines changed

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkDelete/BulkDeleteBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class BulkDeleteBuilder<T>
1212
{
1313
private TableInfor _table;
1414
private IEnumerable<string> _idColumns;
15-
private BulkDeleteOptions _options;
15+
private BulkDeleteOptions _options = BulkDeleteOptions.DefaultOptions;
1616
private readonly ConnectionContext _connectionContext;
1717

1818
public BulkDeleteBuilder(ConnectionContext connectionContext)

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkDelete/BulkDeleteOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
public class BulkDeleteOptions : BulkOptions
44
{
5+
public static readonly BulkDeleteOptions DefaultOptions = new BulkDeleteOptions();
6+
57
public string Collation { get; set; } = Constants.DefaultCollation;
68
}

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkInsert/BulkInsertBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class BulkInsertBuilder<T>
1717
private string _outputIdColumn;
1818
private OutputIdMode _outputIdMode = OutputIdMode.ServerGenerated;
1919
private IEnumerable<string> _columnNames;
20-
private BulkInsertOptions _options;
20+
private BulkInsertOptions _options = BulkInsertOptions.DefaultOptions;
2121
private readonly ConnectionContext _connectionContext;
2222

2323
public BulkInsertBuilder(ConnectionContext connectionContext)

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkInsert/BulkInsertOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
public class BulkInsertOptions : BulkOptions
44
{
5+
public static readonly BulkInsertOptions DefaultOptions = new BulkInsertOptions();
6+
57
public bool KeepIdentity { get; set; }
68
}

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkMatch/BulkMatchBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class BulkMatchBuilder<T>
1818
private TableInfor _table;
1919
private IEnumerable<string> _matchedColumns;
2020
private IEnumerable<string> _returnedColumns;
21-
private BulkMatchOptions _options;
21+
private BulkMatchOptions _options = BulkMatchOptions.DefaultOptions;
2222
private readonly ConnectionContext _connectionContext;
2323

2424
public BulkMatchBuilder(ConnectionContext connectionContext)

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkMatch/BulkMatchOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
public class BulkMatchOptions : BulkOptions
44
{
5+
public static readonly BulkMatchOptions DefaultOptions = new BulkMatchOptions();
6+
57
public string Collation { get; set; } = Constants.DefaultCollation;
68
}

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkMerge/BulkMergeBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class BulkMergeBuilder<T>
1616
private IEnumerable<string> _updateColumnNames;
1717
private IEnumerable<string> _insertColumnNames;
1818
private string _outputIdColumn;
19-
private BulkMergeOptions _options;
19+
private BulkMergeOptions _options = BulkMergeOptions.DefaultOptions;
2020
private readonly ConnectionContext _connectionContext;
2121

2222
public BulkMergeBuilder(ConnectionContext connectionContext)

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkMerge/BulkMergeOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
public class BulkMergeOptions : BulkOptions
44
{
5+
public static readonly BulkMergeOptions DefaultOptions = new BulkMergeOptions();
6+
57
public string Collation { get; set; } = Constants.DefaultCollation;
68

79
public bool WithHoldLock { get; set; }

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkUpdate/BulkUpdateBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class BulkUpdateBuilder<T>
1515
private TableInfor _table;
1616
private IEnumerable<string> _idColumns;
1717
private IEnumerable<string> _columnNames;
18-
private BulkUpdateOptions _options;
18+
private BulkUpdateOptions _options = BulkUpdateOptions.DefaultOptions;
1919
private readonly ConnectionContext _connectionContext;
2020

2121
public BulkUpdateBuilder(ConnectionContext connectionContext)

src/EntityFrameworkCore.SqlServer.SimpleBulks/BulkUpdate/BulkUpdateOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
public class BulkUpdateOptions : BulkOptions
44
{
5+
public static readonly BulkUpdateOptions DefaultOptions = new BulkUpdateOptions();
6+
57
public string Collation { get; set; } = Constants.DefaultCollation;
68
}

0 commit comments

Comments
 (0)