How can you increase timeout in Linq2Entities?

Posted by Russell Steen on Stack Overflow See other posts from Stack Overflow or by Russell Steen
Published on 2010-03-16T12:59:43Z Indexed on 2010/04/04 9:23 UTC
Read the original article Hit count: 359

Filed under:
|
|

I'm doing a basic select against a view. Unfortunately the result can be slow and I'm getting timeout errors intermittently. How can I increase the timeout?

Using .NET 3.5, Sql Server 2000, Linq2Entities

I'm using the very basic query List<MyData> result = db.MyData.Where(x.Attribute == search).ToList();

Fixing the query so that it's faster on the DB side is not an option here.

Exact Error: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

Update: I'd prefer to just change it for this one query.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#