Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandTimeout setting #52

Closed
weisso5 opened this issue Feb 16, 2017 · 4 comments
Closed

CommandTimeout setting #52

weisso5 opened this issue Feb 16, 2017 · 4 comments
Assignees
Milestone

Comments

@weisso5
Copy link

weisso5 commented Feb 16, 2017

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.

@maxtoroq
Copy link
Owner

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.

@weisso5
Copy link
Author

weisso5 commented Feb 17, 2017

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.

maxtoroq added a commit that referenced this issue Feb 24, 2017
@maxtoroq maxtoroq added this to the v6.1.0 milestone Feb 24, 2017
@maxtoroq maxtoroq self-assigned this Feb 24, 2017
@maxtoroq maxtoroq changed the title Accessing Command Settings in Map CommandTimeout setting Jul 3, 2017
@maxtoroq
Copy link
Owner

maxtoroq commented Jul 3, 2017

Note to self: Consider making CreateCommand(string, object[]) virtual.

@maxtoroq
Copy link
Owner

maxtoroq commented Feb 4, 2018

Shipped in v6.1.0

@maxtoroq maxtoroq closed this as completed Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants