Marco baldi

Marco baldi

  • NA
  • 4
  • 468

Select data from changed entity

Jan 5 2021 1:52 PM
Hi,
 
I have this situation :
 
foreach(var item in list) 
{
   var result = dbContext.Customers.ToArrays(); 
 ......
    ......
.......
//Here i insert new customer into database but not saved
 dbContext.Customers.add(new Customer);
 
The problem is for result variable, the first loop works, but the second return Time Out because the Customer Entity is changed, hot to risolve this problem ?
 
Thanks. 

Answers (2)