eljallouly
New member
- Joined
- Jan 5, 2021
- Messages
- 1
- Programming Experience
- 1-3
Hello,
I execute a query inside a loop foreach :
The table Customer has 280 rows, the Sql query works a great.
In the first loop the query works, but in the second loop a query return a time out.
I don't understand what's a problem.
Thank you.
I execute a query inside a loop foreach :
C#:
foreach(var row in List)
{
.....
Var result = dbContext.Customers.ToArray();
.....
}
The table Customer has 280 rows, the Sql query works a great.
In the first loop the query works, but in the second loop a query return a time out.
I don't understand what's a problem.
Thank you.
Last edited by a moderator: