Skip to content

Commit 3127486

Browse files
committed
Remove Single Id Parameter Support
1 parent 7bf0931 commit 3127486

26 files changed

+24
-282
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ await dbct.BulkUpdateAsync(compositeKeyRows,
7979
[ "Column3", "Column2" ]);
8080

8181
await dbct.BulkMergeAsync(rows,
82-
"Id",
82+
["Id"],
8383
[ "Column1", "Column2" ],
8484
[ "Column1", "Column2", "Column3" ]);
8585
await dbct.BulkMergeAsync(compositeKeyRows,
@@ -150,22 +150,22 @@ await connection.BulkInsertAsync(compositeKeyRows,
150150
[ "Id1", "Id2", "Column1", "Column2", "Column3" ]);
151151

152152
await connection.BulkUpdateAsync(rows,
153-
"Id",
153+
["Id"],
154154
[ "Column3", "Column2" ]);
155155
await connection.BulkUpdateAsync(compositeKeyRows,
156156
[ "Id1", "Id2" ],
157157
[ "Column3", "Column2" ]);
158158

159159
await connection.BulkMergeAsync(rows,
160-
"Id",
160+
["Id"],
161161
[ "Column1", "Column2" ],
162162
[ "Column1", "Column2", "Column3" ]);
163163
await connection.BulkMergeAsync(compositeKeyRows,
164164
[ "Id1", "Id2" ],
165165
[ "Column1", "Column2", "Column3" ],
166166
[ "Id1", "Id2", "Column1", "Column2", "Column3" ]);
167167

168-
await connection.BulkDeleteAsync(rows, "Id");
168+
await connection.BulkDeleteAsync(rows, ["Id"]);
169169
await connection.BulkDeleteAsync(compositeKeyRows, [ "Id1", "Id2" ]);
170170
```
171171
### Using Builder Approach in case you need to mix both Dynamic & Lambda Expression

src/EntityFrameworkCore.SqlServer.SimpleBulks.ConnectionExtensionsTests/ConnectionExtensions/BulkDeleteAsyncTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ await connectionContext.BulkDeleteAsync(rows, row => row.Id,
9090
{
9191
if (omitTableName)
9292
{
93-
await connectionContext.BulkDeleteAsync(rows, "Id",
93+
await connectionContext.BulkDeleteAsync(rows, ["Id"],
9494
options =>
9595
{
9696
options.LogTo = _output.WriteLine;
@@ -103,7 +103,7 @@ await connectionContext.BulkDeleteAsync(compositeKeyRows, ["Id1", "Id2"],
103103
}
104104
else
105105
{
106-
await connectionContext.BulkDeleteAsync(rows, new SqlTableInfor(_schema, "SingleKeyRows"), "Id",
106+
await connectionContext.BulkDeleteAsync(rows, new SqlTableInfor(_schema, "SingleKeyRows"), ["Id"],
107107
options =>
108108
{
109109
options.LogTo = _output.WriteLine;

src/EntityFrameworkCore.SqlServer.SimpleBulks.ConnectionExtensionsTests/ConnectionExtensions/BulkDeleteTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void Bulk_Delete_Without_Transaction(bool useLinq, bool omitTableName)
9090
{
9191
if (omitTableName)
9292
{
93-
connectionContext.BulkDelete(rows, "Id",
93+
connectionContext.BulkDelete(rows, ["Id"],
9494
options =>
9595
{
9696
options.LogTo = _output.WriteLine;
@@ -103,7 +103,7 @@ public void Bulk_Delete_Without_Transaction(bool useLinq, bool omitTableName)
103103
}
104104
else
105105
{
106-
connectionContext.BulkDelete(rows, new SqlTableInfor(_schema, "SingleKeyRows"), "Id",
106+
connectionContext.BulkDelete(rows, new SqlTableInfor(_schema, "SingleKeyRows"), ["Id"],
107107
options =>
108108
{
109109
options.LogTo = _output.WriteLine;

src/EntityFrameworkCore.SqlServer.SimpleBulks.ConnectionExtensionsTests/ConnectionExtensions/BulkUpdateAsyncTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ await connectionContext.BulkMergeAsync(compositeKeyRows,
182182
if (omitTableName)
183183
{
184184
await connectionContext.BulkUpdateAsync(rows,
185-
"Id",
185+
["Id"],
186186
["Column3", "Column2"],
187187
options =>
188188
{
@@ -200,7 +200,7 @@ await connectionContext.BulkUpdateAsync(compositeKeyRows,
200200
else
201201
{
202202
await connectionContext.BulkUpdateAsync(rows, new SqlTableInfor(_schema, "SingleKeyRows"),
203-
"Id",
203+
["Id"],
204204
["Column3", "Column2"],
205205
options =>
206206
{
@@ -241,7 +241,7 @@ await connectionContext.BulkUpdateAsync(compositeKeyRows,
241241
if (omitTableName)
242242
{
243243
await connectionContext.BulkMergeAsync(rows,
244-
"Id",
244+
["Id"],
245245
["Column1", "Column2"],
246246
["Column1", "Column2", "Column3"],
247247
options =>
@@ -261,7 +261,7 @@ await connectionContext.BulkMergeAsync(compositeKeyRows,
261261
else
262262
{
263263
await connectionContext.BulkMergeAsync(rows, new SqlTableInfor(_schema, "SingleKeyRows"),
264-
"Id",
264+
["Id"],
265265
["Column1", "Column2"],
266266
["Column1", "Column2", "Column3"],
267267
options =>

src/EntityFrameworkCore.SqlServer.SimpleBulks.ConnectionExtensionsTests/ConnectionExtensions/BulkUpdateTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public void Bulk_Update_Without_Transaction(bool useLinq, bool omitTableName)
182182
if (omitTableName)
183183
{
184184
connectionContext.BulkUpdate(rows,
185-
"Id",
185+
["Id"],
186186
["Column3", "Column2"],
187187
options =>
188188
{
@@ -200,7 +200,7 @@ public void Bulk_Update_Without_Transaction(bool useLinq, bool omitTableName)
200200
else
201201
{
202202
connectionContext.BulkUpdate(rows, new SqlTableInfor(_schema, "SingleKeyRows"),
203-
"Id",
203+
["Id"],
204204
["Column3", "Column2"],
205205
options =>
206206
{
@@ -241,7 +241,7 @@ public void Bulk_Update_Without_Transaction(bool useLinq, bool omitTableName)
241241
if (omitTableName)
242242
{
243243
connectionContext.BulkMerge(rows,
244-
"Id",
244+
["Id"],
245245
["Column1", "Column2"],
246246
["Column1", "Column2", "Column3"],
247247
options =>
@@ -261,7 +261,7 @@ public void Bulk_Update_Without_Transaction(bool useLinq, bool omitTableName)
261261
else
262262
{
263263
connectionContext.BulkMerge(rows, new SqlTableInfor(_schema, "SingleKeyRows"),
264-
"Id",
264+
["Id"],
265265
["Column1", "Column2"],
266266
["Column1", "Column2", "Column3"],
267267
options =>

src/EntityFrameworkCore.SqlServer.SimpleBulks.DbContextExtensionsTests/DbContextExtensions/BulkMergeAsyncTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public async Task BulkMerge_Using_Dynamic_String_With_Transaction(int length, in
211211
}
212212

213213
var result1 = await _context.BulkMergeAsync(rows,
214-
"Id",
214+
["Id"],
215215
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
216216
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
217217
options =>

src/EntityFrameworkCore.SqlServer.SimpleBulks.DbContextExtensionsTests/DbContextExtensions/BulkMergeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public void BulkMerge_Using_Dynamic_String_With_Transaction(int length, int inse
211211
}
212212

213213
var result1 = _context.BulkMerge(rows,
214-
"Id",
214+
["Id"],
215215
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
216216
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
217217
options =>

src/EntityFrameworkCore.SqlServer.SimpleBulks.DbContextExtensionsTests/DbContextExtensions/BulkUpdateAsyncTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public async Task Bulk_Update_Using_Dynamic_String_With_Transaction(int length)
230230
});
231231

232232
await _context.BulkMergeAsync(rows,
233-
"Id",
233+
["Id"],
234234
["Column1", "Column2", "Season", "SeasonAsString"],
235235
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
236236
options =>

src/EntityFrameworkCore.SqlServer.SimpleBulks.DbContextExtensionsTests/DbContextExtensions/BulkUpdateTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public void Bulk_Update_Using_Dynamic_String_With_Transaction(int length)
230230
});
231231

232232
_context.BulkMerge(rows,
233-
"Id",
233+
["Id"],
234234
["Column1", "Column2", "Season", "SeasonAsString"],
235235
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
236236
options =>

src/EntityFrameworkCore.SqlServer.SimpleBulks.DbContextExtensionsTests/DbContextExtensions/UpsertAsyncTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public async Task Upsert_Existing_Using_Dynamic_String_With_Transaction(int leng
253253
existingCompositeKeyRows.SeasonAsString = Season.Spring;
254254

255255
var result1 = await _context.UpsertAsync(existingRow,
256-
"Id",
256+
["Id"],
257257
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
258258
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
259259
options =>
@@ -341,7 +341,7 @@ public async Task Upsert_NonExisting_Using_Dynamic_String_With_Transaction(int l
341341
};
342342

343343
var result1 = await _context.UpsertAsync(newRow,
344-
"Id",
344+
["Id"],
345345
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
346346
["Column1", "Column2", "Column3", "Season", "SeasonAsString"],
347347
options =>

0 commit comments

Comments
 (0)