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

Allow custom Command creation #2127

Open
billrob opened this issue Oct 31, 2024 · 0 comments
Open

Allow custom Command creation #2127

billrob opened this issue Oct 31, 2024 · 0 comments

Comments

@billrob
Copy link
Contributor

billrob commented Oct 31, 2024

There is a use case requested to bake in EF Sql Retry logic discussed in #1864. However to do so requires a Property on the IDbCommand to be set. Using only connection.CreateCommand in the CommandDefinition does not allow this to happen.

Please add a new ctor that takes in a Func<IDbConnection, IDbCommand> createCommand delegate and use that if provided in the SetupCommand method.

billrob added a commit to billrob/dapper-dot-net that referenced this issue Oct 31, 2024
This allows the user to provide their own IDbCommand to be used by Dapper internally.
billrob added a commit to billrob/dapper-dot-net that referenced this issue Oct 31, 2024
This allows the user to provide their own IDbCommand to be used by Dapper internally.
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