Can I do a very large insert with Linq-to-SQL?

前端 未结 4 787
醉酒成梦
醉酒成梦 2021-01-15 01:13

I\'ve got some text data that I\'m loading into a SQL Server 2005 database using Linq-to-SQL using this method (psuedo-code):

Create a DataContext

While (ne         


        
4条回答
  •  -上瘾入骨i
    2021-01-15 01:36

    IF you need to do bulk inserts, you should check out SqlBulkCopy

    Linq-to-SQL is not really suited for doing large-scale bulk inserts.

提交回复
热议问题