Ejemplo n.º 1
0
        public async Task Bulk_SimpleEmployeeTest()
        {
            var employees = EmployeesGenerator.GenerateEmployees(50);

            using (var dbContext = new BulkDataContext(DataConstants.ConnectionString))
            {
                var bulk = new BulkOperations(new TableHandler(new PropertiesHandler()));
                await bulk.BulkInsertAsync(dbContext, employees);
            }
        }
Ejemplo n.º 2
0
        public async Task EF_SimpleEmployeeTest()
        {
            var employees = EmployeesGenerator.GenerateEmployees(50);

            using (var dbContext = new BulkDataContext(DataConstants.ConnectionString))
            {
                dbContext.Employees.AddRange(employees);
                await dbContext.SaveChangesAsync();
            }
        }