How to create a class that works with TransactionScope?

前端 未结 1 1390
滥情空心
滥情空心 2021-02-01 03:34

Just wondering, if I want to create a class that does something and I want to be able to be used in a TransactionScope, what would I need to implement?

That is: My class

相关标签:
1条回答
  • 2021-02-01 04:04

    This article has a good overview of what is required. It's older, but I believe it all still applies.

    To summarize the article, you need to call one of the Enlist methods on the Transaction class, passing in an implementation of IEnlistmentNotification.

    0 讨论(0)
提交回复
热议问题