EF5 Code First TransactionScope without escalating to MSDTC
问题 I'm using EF5 code first, and I need to wrap multiple calls to SaveChanges() in the same transaction. I'm relatively new to using transactionScope, and can't seem to tweak the options on it to accomplish what I'm looking to do. The following code resides in a service class that gets injected with an instance of my DbContext class. I do not create additional instances of DbContext anywhere in this class. At first I tried the following. The code is nice and clean, but it attempts to escalate to