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

Using inside a TransactionScope throws "Specified method is not supported" #16

Open
lawrenceshort opened this issue Feb 23, 2016 · 6 comments

Comments

@lawrenceshort
Copy link

When using a DataContext inside a TransactionScope a "Specified Method is not supported" exception is thrown at the System.Data.Common.DbConnection.EnlistTransaction stage.

@lawrenceshort
Copy link
Author

This can be fixed by including the System.Transactions reference and overriding the EnlistTransaction method in ReliableSqlDbConnection as below

    public override void EnlistTransaction(Transaction transaction)
    {
        ReliableConnection.Current.EnlistTransaction(transaction);
    }

Transactions inside a TransactionScope then function perfectly.

@robdmoore
Copy link
Member

Nice! Do you mind submitting a pull request along with a test?

On 24 Feb 2016, at 1:17 am, lawrenceshort [email protected] wrote:

This can be fixed by including the System.Transactions reference and overriding the EnlistTransaction method in ReliableSqlDbConnection as below

public override void EnlistTransaction(Transaction transaction)
{
    ReliableConnection.Current.EnlistTransaction(transaction);
}

Transactions inside a TransactionScope then function perfectly.


Reply to this email directly or view it on GitHub.

@psheldon
Copy link

psheldon commented Sep 5, 2017

Is it possible to get the NuGet package update with this fix? I've installed the package that has the transient fault handling library ILMerged into it, and I'm getting this same exception as above.

@robdmoore
Copy link
Member

More than happy for anyone to submit a PR

@psheldon
Copy link

psheldon commented Sep 5, 2017 via email

@robdmoore
Copy link
Member

AH, so it was - sorry.

Looks like tests are failing on that. Not sure if it's the build server or the code itself.

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

3 participants