'Declaration
Public Class UnitOfWork
public class UnitOfWork
public ref class UnitOfWork
'Declaration
Public Class UnitOfWork
public class UnitOfWork
public ref class UnitOfWork
Use a UnitOfWork to perform atomic updates and deletions on adTempus objects. All operations added to the UnitOfWork are sent to the server in a single call, and the object validation and database updates are performed in a single transaction, so that if any of the operations fail none will be committed.
After adding operations to the UnitOfWork using AddForSave and AddForDelete, call Commit to commit the changes to the server. To discard the changes without saving, simply discard the UnitOfWork: there is no explicit rollback method.
If you want to reuse a UnitOfWork that has bot been committed, call Clear first to empty it.
The order in which actions are added to the UnitOfWork does not matter: the server will sequence actions properly based on dependencies.
Use DataContext.CreateUnitOfWork to create a new UnitOfWork.
A UnitOfWork can only contain objects that belong to the same DataContext as the UnitOfWork. If you try to add an object from another DataContext you will get a BoundaryViolationException
System.Object
ArcanaDevelopment.adTempus.Client.UnitOfWork