在实体框架中更新单个事务中的多个对象 [英] Updating multiple objects in single transaction in entity framework
本文介绍了在实体框架中更新单个事务中的多个对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
你可以看一下如何:管理实体框架中的事务 MSDN上的文章。基本上您将使用 TransactionScope 类来界定边界的交易。
I'm adding a set of objects using entity framework in single context but want to be in a transaction. How I can do that?
解决方案
You may take a look at the How to: Manage Transactions in the Entity Framework article on MSDN. Basically you would use the TransactionScope class to demarcate the boundaries of the transaction.
这篇关于在实体框架中更新单个事务中的多个对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文