0

I'm using a DbContext and want set CommandTimeout = 1 week. What is max timeout value for CommandTimeout?

((IObjectContextAdapter)this.context).ObjectContext.CommandTimeout = ?max?;

In connection string I also need set max time out value. What is max Connect Timeout value i can set?

<connectionStrings>
    <add name="TestEntities" connectionString="metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=DBTest;user id=sa;password=p/w; Connect Timeout=?max?; MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />    
  </connectionStrings>
1
  • 1
    This answer may be useful. Commented Dec 20, 2013 at 10:31

1 Answer 1

1

A value of 0 indicates no limit (an attempt to execute a command will wait indefinitely). So 'indefinitely' is max value.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.