In the actual project in, it will perform during the execution of a large amount of computation, very long time.
When this time in the practical application of the project, will be reported when the dapper execute sql "Object reference not to the instance of the object."
Internet search a lot of content, can not solve.
Later, step by step output, may find problems when stored procedure execution.
So query timeout on the use of the dapper
Dapper currently used to call a stored procedure in SQL statements task of backing up data, but the problem CommandTimeout execution timeout occurs, such as:
Dapper
The Excute
method has several versions of overloading, which contains the option to set the query timeout, such as:
Where: commandTimeout
parameter is the query timeout
Specific call the method:
The above code, we will Dapper's Exceute
query method timeout became 60 seconds.
Used in the project