Answer the question
In order to leave comments, you need to log in
How to wait for the response of sql query execution?
There is a rather long running SQL query
In C # I fill the List through it through EF in this way
lstGrafic = db.Database.SqlQuery<GraficInfo>(
s,
new SqlParameter("@dateStart", this.dateStart)
)
.OrderBy(x => x.VD)
.ToList();
System.ComponentModel.Win32Exception (0x80004005): Operation timed out
Thread.Sleep(30 * 1000);
Answer the question
In order to leave comments, you need to log in
use the TPL library or async/await. it's just that when you need a response from the database, just turn on the "wait" method (the wait method for TPL, await for async) and when it works, do whatever you want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question