C# – Custom datareader for SqlBulkCopy(daniel.wertheim.se)
submitted by
sedanwer(216) 1 year, 6 months ago
When prototyping SisoDb I used datatables under the covers when consuming the SqlBulkCopy class to insert data. This lead to that I had the source entities in memory as well as the datatables. Since the SqlBulkCopy class can work with readers I created a very simple datareader implementation over my entities instead. I gained a little performance boost and got rid of unnecessary creation of in-memory datatables. At first the API of a datareader seems kind of tedious to implement, but in the context of using it in conjunction with the SqlBulkCopy-class, there really isn’t that many methods that need to be implemented...
|category: ADO.NET
|Views: 51
tags:
ADO.NET Database another
Everyones tags:
Your Tags: