public async Task BluckInsert() { var orders = new List <Order>() { new Order { OrderId = 1, OrderItems = new List <OrderItem> { new OrderItem { SkuId = "S1", Status = "S1" } } }, new Order { OrderId = 2, OrderItems = new List <OrderItem> { new OrderItem { SkuId = "S2", Status = "S2" } } } }; await CustomRepository.BulkInsertAsync(orders); //for (int i = 0; i < 1000; i++) //{ // orders.Add(new Product { Name = "P" + i.ToString() }); //} //System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); //stopwatch.Start(); ////foreach (var item in orders) ////{ //// await _productRepository.InsertAsync(item); ////} //await CurrentUnitOfWork.SaveChangesAsync(); //stopwatch.Stop(); //var r2 = stopwatch.ElapsedMilliseconds; //stopwatch.Restart(); ////await CurrentUnitOfWork.GetDbContext<EdwardAbpDbContext>().BulkInsertAsync(orders); ////await CurrentUnitOfWork.SaveChangesAsync(); ////stopwatch.Stop(); ////var r1 = stopwatch.ElapsedMilliseconds; ////stopwatch.Restart(); //await CustomRepository.BulkInsertAsync(orders); //await CurrentUnitOfWork.SaveChangesAsync(); //stopwatch.Stop(); //var r3 = stopwatch.ElapsedMilliseconds; //_orderRepository.InsertBluck(orders); }