Bulk Insert Optimization in .NET / EF Core
问题 I have some .NET Core code that does some bulk loading of the DB with random sample data. I'm getting 20 inserts/second on localhost, and looking to improve my performance. I'm doing the basic stuff like calling _dbContext.SaveChanges() only once, etc. A number of posts like this indicate gains can be had by manipulating properties on the DbContext's Configuration, such as Configuration.AutoDetectChangesEnabled and Configuration.ValidateOnSaveEnabled . My .NET Core MVC app's DbContext is a