开发者

Managing transactions using ADO.Net Entity framework - Update multiple databases

开发者 https://www.devze.com 2023-01-01 17:17 出处:网络
I need t开发者_Python百科o update multiple databases in one transaction using entity framework. Means if we need to insert records in two tables of two different databases and insertion succeeds for f

I need t开发者_Python百科o update multiple databases in one transaction using entity framework. Means if we need to insert records in two tables of two different databases and insertion succeeds for first database but fails for other database then insertion in first database should also get rolled back.

Please let me know if we can do this using entity framework.

Thanks

Sharad Rastogi


Managing Connections and Transactions (Entity Framework)

You can use a TransactionScope to accomplish what you require.

How to: Manage Transactions in the Entity Framework

TransactionScope and ADO.NET Entity Framework

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号