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
精彩评论