I'v built an entity model for my database using Entity Developer. Everything is running great. However, the default command timeout property for my connection is the default of 30 seconds. This is fine for most of my operations, however, I have a couple of stored procedures that I've mapped to methods that can take a lot longer than 30 seconds to run.
1. Is there a way I can change the timeout for those operations without affecting other "normal" queries?
2. If I set the timeout to 0, will the code wait until the stored procedure finishes and never timeout?
Tony
Setting Timeout in Entity Model
Please set the "Default Command Timeout=0;" connection string parameter.
You can also control the timeout in your code by setting a public CommandTimeout property of ObjectContext.
The mentioned connection string parameter will affect all the queries.TonyV wrote:1. Is there a way I can change the timeout for those operations without affecting other "normal" queries?
It will never timeout.TonyV wrote:2. If I set the timeout to 0, will the code wait until the stored procedure finishes and never timeout?
You can also control the timeout in your code by setting a public CommandTimeout property of ObjectContext.