1
Using the Webmatrix.Data.Database namespace, I am having problems executing a query that returns a lot of data, resulting in a Timeout.
How can I increase the timeout of this query?
Code example:
var db = WebMatrix.Data.Database.Open("DefaultConnection");
var resultado = db.Query(consulta); //Timeout na execução desta consulta
return resultado.ToList().Count;
Web.config
<add name="DefaultConnection" connectionString="Data
Source=localhost;Initial Catalog=DefaultDB;User Id=foo;Password=bar;"
providerName="System.Data.SqlClient" />
I can change the timeout of the connection time only, but I can’t find the property to change the timeout of the performed query.