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

Cancellation Token support for Async transaction methods #637

Open
dje1990 opened this issue Mar 31, 2022 · 1 comment
Open

Cancellation Token support for Async transaction methods #637

dje1990 opened this issue Mar 31, 2022 · 1 comment

Comments

@dje1990
Copy link

dje1990 commented Mar 31, 2022

Hi,
Regarding in the class Database.cs the methods BeginTransactionAsync(), AbortTransactionAsync() and CompleteTransactionAsync().
Thank for you implementing these methods.
Is it possible to pass through a cancellationToken to the underlying DbConnection methods?
BeginTransactionAsync() already has an overload that takes a cancellationToken as a parameter, but the method does not pass this cancellationToken to DbTransaction.BeginTransactionAsync().
AbortTransactionAsync() and CompleteTransactionAsync() do not have overloads that take a cancellationToken as a parameter, but could pass one to CleanupTransactionAsync(), which could then pass the cancellationToken to DbTransaction.CommitAsync() and DbTransaction.RollbackAsync().

Thanks for your help.

Related to:
#629
#628

@Ste1io
Copy link
Collaborator

Ste1io commented Sep 28, 2023

I noticed the same thing when working on the doc comments; check the branch for #682 and you'll see I added inline to-do comments and put it on the list of fixes for once that PR is merged.

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

2 participants