UnitOfWork2 Class |
Namespace: SD.LLBLGen.Pro.ORMSupportClasses
The UnitOfWork2 type exposes the following members.
Name | Description | |
---|---|---|
UnitOfWork2 |
CTor
| |
UnitOfWork2(ListUnitOfWorkBlockType) |
Initializes a new instance of the UnitOfWork2 class.
| |
UnitOfWork2(SerializationInfo, StreamingContext) |
CTor for deserialization
|
Name | Description | |
---|---|---|
CommitOrder |
Gets / sets the Commit Order of the various blocks the unit of work groups the elements in.
| |
IsEmpty |
Gets whether the unit of work is empty
| |
OptimizedSerialization | Obsolete.
Gets / sets the OptimizedSerialization flag. Default: true. When set to false, the serialization logic will simply serialize all entities inside the
unit of work. When set to true, the unit of work will first calculate the save queues, which weeds out entities which aren't changed and won't be
saved anyway, so these don't have to be sent over the wire.
|
Name | Description | |
---|---|---|
AddCallBack(Delegate, UnitOfWorkCallBackScheduleSlot, Object) |
Adds the call back passed in, to the slot specified with the parameters specified.
| |
AddCallBack(Delegate, UnitOfWorkCallBackScheduleSlot, Boolean, Object) |
Adds the call back passed in, to the slot specified with the parameters specified.
| |
AddCollectionForDelete |
Adds the collection with entities for deletion.
| |
AddCollectionForSave(IEntityCollection2) |
Adds the collection with entities for saving. No recursion and no refetch are done for these entities.
| |
AddCollectionForSave(IEntityCollection2, Boolean, Boolean) |
Adds the collection with entities for saving.
| |
AddDeleteEntitiesDirectlyCall(String, IRelationPredicateBucket) |
Adds a DeleteEntitiesDirectly call to be scheduled during Commit. It is called right after the last entity has been deleted but before the post delete
callbacks are called.
| |
AddDeleteEntitiesDirectlyCall(Type, IRelationPredicateBucket) |
Adds a DeleteEntitiesDirectly call to be scheduled during Commit. It is called right after the last entity has been deleted but before the post delete
callbacks are called.
| |
AddForDelete(IEntity2) |
Adds the passed in entity for deletion.
| |
AddForDelete(IEntity2, IPredicateExpression) |
Adds the passed in entity for deletion.
| |
AddForSave(IEntity2) |
Adds the passed in entity for saving. No refetching will be applied.
| |
AddForSave(IEntity2, IPredicateExpression) |
Adds the passed in entity for saving. No refetching will be applied.
| |
AddForSave(IEntity2, Boolean) |
Adds the passed in entity for saving.
| |
AddForSave(IEntity2, IPredicateExpression, Boolean) |
Adds the passed in entity for saving.
| |
AddForSave(IEntity2, IPredicateExpression, Boolean, Boolean) |
Adds the passed in entity for saving.
| |
AddInsertEntitiesDirectlyCall |
Adds an InsertEntitiesDirectly call to be scheduled during Commit. It is called right after the last entity has been inserted but before the post insert
callbacks are called.
| |
AddUpdateEntitiesDirectlyCall |
Adds an UpdateEntitiesDirectly call to be scheduled during Commit. It is called right after the last entity has been updated but before the pre delete
callbacks are called.
| |
Commit(IDataAccessAdapter) |
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
| |
Commit(IDataAccessAdapter, Boolean) |
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
| |
CommitAsync(IDataAccessAdapter) |
Async variant of Commit(IDataAccessAdapter).
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
| |
CommitAsync(IDataAccessAdapter, Boolean) |
Async variant of Commit(IDataAccessAdapter, Boolean).
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
| |
CommitAsync(IDataAccessAdapter, CancellationToken) |
Async variant of Commit(IDataAccessAdapter).
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
| |
CommitAsync(IDataAccessAdapter, Boolean, CancellationToken) |
Async variant of Commit(IDataAccessAdapter, Boolean).
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
| |
ConstructSaveProcessQueues |
Constructs the save process queues for insert and update actions. These queues are constructed from the entities added to this UoW
for save either individually or in a collection. Call this method to determine what the sequence will be for the insert and update
actions executed during Commit(). Commit() uses this method as well as well as the serialization/deserialization logic, to avoid
sending large object graphs with few changes.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetCollectionElementsToDelete |
Gets the UnitOfWorkCollectionElement2s with the collections which are added with AddCollectionForDelete, in a new List.
To remove a collection, call RemoveCollectionFromUoW(IEntityCollection2) | |
GetCollectionElementsToSave |
Gets the UnitOfWorkCollectionElement2s with the collections which are added with AddCollectionForSave, in a new List.
To remove a collection, call RemoveCollectionFromUoW(IEntityCollection2) | |
GetEntityElementsToDelete |
Gets the UnitOfWorkElement2s with the entities which are added with AddForDelete, in a new List.
To remove an entity, call RemoveFromUoW(IEntity2) | |
GetEntityElementsToInsert |
Gets the UnitOfWorkElement2s with the entities which are added with AddForSave and which are new, in a new List.
To remove an entity, call RemoveFromUoW(IEntity2) | |
GetEntityElementsToUpdate |
Gets the UnitOfWorkElement2s with the entities which are added with AddForSave and which are not new, in a new List.
To remove an entity, call RemoveFromUoW(IEntity2) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetInsertQueue |
Gets the insert queue, which is a list of ActionQueueElement(of IEntity2) objects which have been placed in the insert queue.
This queue is empty unless ConstructSaveProcessQueues has been called, or Commit has been called, which calls
ConstructSaveProcessQueues under the hood. If this method is called after Commit, and Commit succeeded, the
entities in the queue returned are saved succesfully. Calling Reset will not clear the queues, only ConstructSaveProcessQueues
or Commit will.
| |
GetObjectData |
Populates a SerializationInfo with the data needed to serialize the target object.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUpdateQueue |
Gets the update queue, which is a List of ActionQueueElements(Of IEntity2) objects which have been placed in the update queue.
This queue is empty unless ConstructSaveProcessQueues has been called, or Commit has been called, which calls
ConstructSaveProcessQueues under the hood. If this method is called after Commit, and Commit succeeded, the
entities in the queue returned are saved succesfully. Calling Reset will not clear the queues, only ConstructSaveProcessQueues
or Commit will.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
RemoveCollectionFromUoW |
Removes the specified entity collection from this UnitOfWork.
| |
RemoveFromUoW |
Removes the specified entity from this UnitOfWork. If the entity is in an added collection, the entity will later on still be added.
| |
Reset |
Resets the inner contents of this unit of work.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
IXmlSerializableGetSchema |
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.
| |
IXmlSerializableReadXml |
Generates an object from its XML representation.
| |
IXmlSerializableWriteXml |
Converts an object into its XML representation.
| |
IUnitOfWorkCoreAddCollectionForDelete |
Adds the collection with entities for deletion.
| |
IUnitOfWorkCoreAddCollectionForSave(IEntityCollectionCore) |
Adds the collection with entities for saving. No recursion and no refetch are done for these entities.
| |
IUnitOfWorkCoreAddCollectionForSave(IEntityCollectionCore, Boolean, Boolean) |
Adds the collection with entities for saving.
| |
IUnitOfWorkCoreAddForDelete |
Adds the passed in entity for deletion.
| |
IUnitOfWorkCoreAddForSave(IEntityCore) |
Adds the passed in entity for saving. No refetching will be applied. Save is recursive.
| |
IUnitOfWorkCoreAddForSave(IEntityCore, Boolean) |
Adds the passed in entity for saving. No refetching will be applied. Save is recursive.
| |
IUnitOfWorkCoreCommit(ITransactionController) |
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes. This order can be controlled by the
constructor of the unit of work which allows users to define a different work order.
| |
IUnitOfWorkCoreCommit(ITransactionController, Boolean) |
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes. This order can be controlled by the
constructor of the unit of work which allows users to define a different work order.
| |
IUnitOfWorkCoreCommitAsync |
Async variant of Commit(ITransactionController)
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes. This order can be controlled by the
constructor of the unit of work which allows users to define a different work order.
| |
IUnitOfWorkCoreReset |
Resets the inner contents of this Unit of work object
|