When should I call SaveChanges() when creating 1000’s of Entity Framework objects? (like during an import) [duplicate]
I would test it first to be sure. Performance doesn’t have to be that bad. If you need to enter all rows in one transaction, call it after all of AddToClassName class. If rows can be entered independently, save changes after every row. Database consistence is important. Second option I don’t like. It would be … Read more