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

Use RetryProvider in SqlKata.Execution #718

Open
Genmutant opened this issue May 1, 2024 · 0 comments
Open

Use RetryProvider in SqlKata.Execution #718

Genmutant opened this issue May 1, 2024 · 0 comments

Comments

@Genmutant
Copy link

I'm trying to use a RetryProvider with the SqlKata.Execution package.

Which works for the RetryProvider on the connection, as I can just set it before passing the connection to a new QueryFactory object.
I can't find a way to pass it to the internally created Command object though.
My current workaround is implementing my own IDbConnection object and passing the methods to the underlying SqlConnection. CreateCommand I set the RetryProvider before returning the new command.

This is not a great solution, as Dapper internally has different paths for SqlConnection and IDbConnection - for example I have to pass an open IDbConnection, while with SqlConnection it can handle open and closing itself.

Are there any nicer solutions I overlooked, or are there plans to support RetryProviders?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant