@@ -247,17 +247,6 @@ using (var connection = new SqlConnection(ConnectionString))
247
247
}
248
248
```
249
249
250
- Or with qualifiers
251
-
252
- ``` csharp
253
- using (var connection = new SqlConnection (ConnectionString ))
254
- {
255
- var customers = GetCustomers ();
256
- var qualifiers = Field .From (" LastName" , " BirthDate" );
257
- var rows = connection .BulkInsert <Customer >(customers , qualifiers : qualifiers );
258
- }
259
- ```
260
-
261
250
Or via table-name
262
251
263
252
``` csharp
@@ -268,17 +257,6 @@ using (var connection = new SqlConnection(ConnectionString))
268
257
}
269
258
```
270
259
271
- Or via table-name with qualifiers
272
-
273
- ``` csharp
274
- using (var connection = new SqlConnection (ConnectionString ))
275
- {
276
- var customers = GetCustomers ();
277
- var qualifiers = Field .From (" LastName" , " BirthDate" );
278
- var rows = connection .BulkInsert (" Customer" , customers , qualifiers : qualifiers );
279
- }
280
- ```
281
-
282
260
### BulkInsert via DataTable
283
261
284
262
``` csharp
@@ -289,17 +267,6 @@ using (var connection = new SqlConnection(ConnectionString))
289
267
}
290
268
```
291
269
292
- Or with qualifiers
293
-
294
- ``` csharp
295
- using (var connection = new SqlConnection (ConnectionString ))
296
- {
297
- var table = GetCustomersAsDataTable ();
298
- var qualifiers = Field .From (" LastName" , " BirthDate" );
299
- var rows = connection .BulkInsert <Customer >(table , qualifiers : qualifiers );
300
- }
301
- ```
302
-
303
270
Or via table-name
304
271
305
272
``` csharp
@@ -310,17 +277,6 @@ using (var connection = new SqlConnection(ConnectionString))
310
277
}
311
278
```
312
279
313
- Or via table-name with qualifiers
314
-
315
- ``` csharp
316
- using (var connection = new SqlConnection (ConnectionString ))
317
- {
318
- var table = GetCustomersAsDataTable ();
319
- var qualifiers = Field .From (" LastName" , " BirthDate" );
320
- var rows = connection .BulkInsert (" Customer" , table , qualifiers : qualifiers );
321
- }
322
- ```
323
-
324
280
### BulkInsert via DbDataReader
325
281
326
282
``` csharp
@@ -333,19 +289,6 @@ using (var connection = new SqlConnection(ConnectionString))
333
289
}
334
290
```
335
291
336
- Or with qualifiers
337
-
338
- ``` csharp
339
- using (var connection = new SqlConnection (ConnectionString ))
340
- {
341
- using (var reader = connection .ExecuteReader (" SELECT * FROM [dbo].[Customer];" ))
342
- {
343
- var qualifiers = Field .From (" LastName" , " BirthDate" );
344
- var rows = connection .BulkInsert <Customer >(reader , qualifiers : qualifiers );
345
- }
346
- }
347
- ```
348
-
349
292
Or via table-name
350
293
351
294
``` csharp
@@ -358,19 +301,6 @@ using (var connection = new SqlConnection(ConnectionString))
358
301
}
359
302
```
360
303
361
- Or via table-name with qualifiers
362
-
363
- ``` csharp
364
- using (var connection = new SqlConnection (ConnectionString ))
365
- {
366
- using (var reader = connection .ExecuteReader (" SELECT * FROM [dbo].[Customer];" ))
367
- {
368
- var qualifiers = Field .From (" LastName" , " BirthDate" );
369
- var rows = connection .BulkInsert (" Customer" , reader , qualifiers : qualifiers );
370
- }
371
- }
372
- ```
373
-
374
304
## BulkMerge
375
305
376
306
Bulk merge a list of data entity objects into the database. A record is being inserted in the database if it is not exists using the defined qualifiers. It returns the number of rows inserted/updated in the database.
0 commit comments