My command keeps timing out, so I need to change the default command timeout value.
I’ve found myDb.Database.Connection.ConnectionTimeout, but it’s readonly.
How can I set the command timeout in Entity Framework 5 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this on your context:
If you want to define the timeout in the connection string, use the
Connection Timeoutparameter like in the following connection string:Source: How to: Define the Connection String