Wrapping membership provider and dbcontext on single transaction
问题 MVC Project using EF 5 code first and .NET 4.5. I was looking for a way to wrap dbContext and SimpleMembershipProvider on a single transaction. I tried to use TransactionScope but since the membership provider will open another connection I get an exception (MSDTC on server 'servername' is unavailable). So I though I could use ObjectContext.Connection.BeginTransaction instead. The membership provider won't be part of the transaction but the idea is to have it somewhere where if it fails the