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 existing transaction identifier in RelationalConnection.UseTransaction #20844

Merged
merged 4 commits into from
May 18, 2020

Conversation

Marusyk
Copy link
Member

@Marusyk Marusyk commented May 5, 2020

Add overload that takes a GUID to use for the transaction ID.

Fixes: #20828

Please review
Thank you in advance

@Marusyk Marusyk marked this pull request as draft May 5, 2020 19:57
@@ -53,10 +54,30 @@ public interface IRelationalTransactionManager : IDbContextTransactionManager
/// Specifies an existing <see cref="DbTransaction" /> to be used for database operations.
/// </summary>
/// <param name="transaction"> The transaction to be used. </param>
/// <param name="transactionId"> The unique identifier for the transaction. </param>
/// <returns> An instance of <see cref="IDbTransaction" /> that wraps the provided transaction. </returns>
IDbContextTransaction UseTransaction([CanBeNull] DbTransaction transaction, Guid transactionId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndriySvyryd Do you think it's worth doing a default implementation of these methods in the interface?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think this change breaks anything.

@ajcvickers ajcvickers merged commit 9e78d7e into dotnet:master May 18, 2020
@ajcvickers
Copy link
Member

Thanks @Marusyk

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

Successfully merging this pull request may close these issues.

RelationalConnection.UseTransaction creates a new transactionId.
4 participants