public async Task Test() { List<Industrial> list = new List<Industrial>(); for (int i = 0; i < 10000; i++) { list.Add(new Industrial() { PrimaryKey = Guid.NewGuid(), YearStr = "2021", UpdateTime = DateTime.Now.AddYears(-1) }); ; } _or public async Task Test() { List<Industrial> list = new List<Industrial>(); for (int i = 0; i < 10000; i++) { list.Add(new Industrial() { PrimaryKey = Guid.NewGuid(), YearStr = "2021", UpdateTime = DateTime.Now.AddYears(-1) }); ; } _orclContext.Database.EnsureCreated(); _logger.LogInformation($"Oracle连接{_orclContext.Database.CanConnect()}"); _logger.LogInformation($"生成对象完成{list.Count}"); var bulkShardingEnumerable = _orclContext.BulkShardingTableEnumerable(list); foreach (var dataSourceMap in bulkShardingEnumerable) { dataSourceMap.Key.BulkInsert(dataSourceMap.Value.ToList()); } _logger.LogInformation("插入成功"); }clContext.Database.EnsureCreated(); _logger.LogInformation($"Oracle连接{_orclContext.Database.CanConnect()}"); _logger.LogInformation($"生成对象完成{list.Count}"); var bulkShardingEnumerable = _orclContext.BulkShardingTableEnumerable(list); foreach (var dataSourceMap in bulkShardingEnumerable) { dataSourceMap.Key.BulkInsert(dataSourceMap.Value.ToList()); } _logger.LogInformation("插入成功"); }