Closed weisso5 closed 6 years ago
I think having a configuration setting would be the least intrusive change, although it would affect all commands, but you could temporarily set then reset it.
Actually, there was a Map
extension method for IDbCommand
in v5, but the API was simplified in v6 and most extension methods didn't make the cut.
Agreed, I was looking at it at the same way transaction was set:
if (transaction != null) { command.Transaction = transaction; }
thus would affect all commands created with this Database object, Look forward to see what you come up with.
Note to self: Consider making CreateCommand(string, object[])
virtual.
Shipped in v6.1.0
Hello, Excellent library. Running into a Command Timeout situation when using Map:
db.Map<SomeObject>(sql).ToArray();
I know there is the
db.CreateCommand(sql);
but then you lose the nice and simple POCOMapping you offer.Any plans to allow settings to be pushed into the internal call to CreateCommand (or another solution):
return (IEnumerable<TResult>) new MappingEnumerable<TResult>(this.CreateCommand(query), mapper, this.Configuration.Log);
Thanks.