Pass commandTimeout to Dapper
Closed this issue · 1 comments
iamgmd commented
Add the ability to pass commandTimeout value through to Dapper on query.Execute. There are some use-cases where the default commandTimeout is not enough to run lengthy queries:-
example below but would be great to have this passed through as queryOptions or something:
public IEnumerable<TEntityType> Execute<TEntityType>(IDbConnection connection, Func<object[], TEntityType> map)
{
var results = connection.Query<TEntityType>(
commandTimeout: 300,
sql: this.ToString(),
types: this._types.ToArray(),
param: this.Parameters,
map: map,
splitOn: string.Join(",", this._splitOn)
);
return results.Where(e => e != null);
}
dougrday commented
This was released in 0.4.2-beta.