How do I use TransactionScope with MySql and Entity Framework? (getting Multiple simultaneous connections…are not currently supported error)

后端 未结 2 751
感情败类
感情败类 2020-12-16 16:20

I have a new .NET 4.0 console application that uses:

  • MySql 6.4.4.0
  • Entity Framework 4.2 (code-first)
  • Visual Studio 2010

So far

2条回答
  •  误落风尘
    2020-12-16 17:05

    Kindly complete the scope.

    The Complete method commits the transaction. If an exception has been thrown,

    Complete is not called and the transaction is rolled back.

     scope.Complete();
    

    See MSDN.

提交回复
热议问题