public async Task BulkInsert_ShouldCreateExpectedAmountOfItems(int countToInsert) { var initialCount = await GetCount(); var items = Enumerable.Range(0, countToInsert).Select(x => GetRandom()).ToList(); using (var context = new NorthwindContext()) { await context.BulkInsertAsync(items, new BulkConfig() { SetOutputIdentity = true, PreserveInsertOrder = true // with or without that setting }); } var newCount = await GetCount(); newCount.Should().Be(initialCount + countToInsert); items.Any(i => i.CategoryId == default(int)).Should().BeFalse(); }