Using the WebMatrix.Data.Database namespace, I'm having trouble executing a query that returns a lot of data, resulting in a Timeout.
How can I increase the timeout of this query?
Code sample:
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 only change the timeout of the connection time, but I can not find the property to change the query timeout.