6
Shouts

C# – Batch identity inserts « Daniel Wertheim

published 943 days, 20 hours, 47 minutes ago posted by sedanwersedanwer 944 days, 19 hours, 7 minutes ago
Monday, October 25, 2010 12:24:46 PM GMT Sunday, October 24, 2010 2:04:59 PM GMT

I’m currently building support for identity inserts in SisoDb where I need to let the database generate the ids and then assign them to the entities. To get better performance I want to batch up the inserts and sending them in a large chunk to the Sql-server and I want to make use of parameters to be protected from sql-injection attacks. You can of course use SqlBulkCopy but it will not let you get the generated identities so that you can assign them to your entities.

category: Data | clicked: 0 | | source: daniel.wertheim.se | show counter code
tags: ADO.NET, bulk insert, identity bulk insert

No comments yet, be the first one to post comment.

To post your comment please login or signup