C# – Batch identity inserts

added by sedanwer
10/24/2010 9:05:58 AM

0 Kicks, 110 Views

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.


0 comments