.net - EF code first inserting many rows -
i'm using ef code first , need insert many rows table, couple of thousand records, have in generic list. doing foreach loop , adding each entity table , finish savechanges() takes quite while.
is there bulky way of doing ef or code first or should sqlcommand or sqlbulkcopy instead? also, there can switch off in ef code first make inserts faster?
thanks help!
you can call savechanges()
less often.
however, nothing can ef approach performance of sqlbulkcopy.
Comments
Post a Comment