Is there a way to use TransactionScope with an existing connection?
问题 I have some code that works like the advised use of TransactionScope, but has an ambient connection instead of an ambient transaction. Is there a way to use a TransactionScope object with an existing connection, or is there an alternative in the .Net framework for this purpose? 回答1: In fact, there is one way. connection.EnlistTransaction(Transaction.Current) It works and it doesnt promote transaction to distributed if not necessary (contrary to what documentation says) HTH 回答2: To enlist a