Share via


TransactionManager.BeginTransaction Method

Creates a new transaction object with a given name and returns a reference to it.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)

Syntax

'Declaration
Public Function BeginTransaction As Transaction
public Transaction BeginTransaction()
public:
Transaction^ BeginTransaction()
member BeginTransaction : unit -> Transaction
public function BeginTransaction() : Transaction

Return Value

Type: Microsoft.VisualStudio.Modeling.Transaction
A Transaction object.

Remarks

For examples and more information, see Using Transactions.

Examples

using (Transaction t = this.Store.TransactionManager.BeginTransaction("add instances from class diagram"))
 {
  // Make changes to Store content...
  t.Commit();
}

.NET Framework Security

See Also

Reference

TransactionManager Class

BeginTransaction Overload

Microsoft.VisualStudio.Modeling Namespace