Closed starsoheil2007 closed 1 year ago
That sets the connection timeout, not the command timeout.
You should use CreateCommand
in Mighty. (There are lots of variants to fully set up any parameters, just as you would when normally letting Mighty create it's own commands internally.) Then, set the DbCommand.CommandTimeout
property, then pass the command to Mighty's Query
, Execute
, Single
, etc. (or the Aysnc
versions) which all have a variant which takes a DbCommand
.
Btw, when using the Mighty methods which accept a DbCommand
, you are recommended to always pass in a command created by Mighty's CreateCommand
, not one you created from scratch yourself (to get all the setup which Mighty does by default).
Hi I have this line in my connection string
Connection Timeout=3000;
but I got this exception :
Timeout expired.
My query takes 30 seconds to get result in SQL server .