I am sure this is the main question, but I can not find any solution for google here.
when I try to use this block of code, it throws an exception that is 'System.Activities.Statements.TransactionScope': the type used in the using statement must be implicitly converted to 'System.IDisposable'
using (TransactionScope trans = new TransactionScope()) { }
I just want to use TransactionScope in Linq code.
Thanks, Relationship
You are probably using the wrong TransactionScope.
, , System.Transactions.TransactionScope, System.Transactions.dll. , ( ), "using System.Transactions".
System.Transactions.TransactionScope
using System.Transactions
, System.Activities.Statements.TransactionScope, System.Transactions.TransactionScope. System.Transactions.dll.
System.Activities.Statements.TransactionScope
System.Transactions.dll
:
public sealed class TransactionScope : IDisposable
, System.Activities.Statements.TransactionScope System.Activities.Statements,
System.Activities.Statements
System.Activities.Statements , . , , , , , .
.
TransactionScope. System.Transactions. , System.Activities.Statements.
TransactionScope
System.Transactions