http://msdn.microsoft.com/en-us/library/bb738523.aspx

 This topic provides an example of how to define a transaction that coordinates making changes to objects in an object context with other external operations. For more information, see Managing Connections and Transactions.

The example in this topic is based on the AdventureWorks Sales Model. To run the code in this example, you must have already added the AdventureWorks Sales Model to your project and configured your project to use the Entity Framework. To do this, complete the procedure in How to: Use the Entity Data Model Wizard. You must also have Microsoft Windows Message Queuing installed.

Example

VB
// Dispose the object context. context.Dispose(); } } }

相关文章: