public async Task InsertSingleProductsEf6(int interactions, Ef6Context ef6Context) { var listCustomers = new ListTests().ObtenirListProductsAleatoire(interactions, null); ef6Context.Products.AddRange(listCustomers); await ef6Context.SaveChangesAsync(); }
public async Task <TimeSpan> InsertSingleProducts(int interactions) { var listCustomers = new ListTests().ObtenirListProductsAleatoire(interactions, null); var watch = _consoleHelper.StartChrono(); await _netcoreContext.Products.AddRangeAsync(listCustomers); await _netcoreContext.SaveChangesAsync(); var tempoResult = _consoleHelper.StopChrono(watch, "EF Core").Tempo; await _resultService.SaveSelect(interactions, tempoResult, watch.InitMemory, TypeTransaction.EfCore, OperationType.InsertSingle); return(tempoResult); }