UnitOfWork2AddForSave Method (IEntity2, IPredicateExpression, Boolean, Boolean) |
Adds the passed in entity for saving.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.11.0.0 (5.11.23.1114)
Syntax public virtual bool AddForSave(
IEntity2 entityToSave,
IPredicateExpression restriction,
bool refetch,
bool recurse
)
Public Overridable Function AddForSave (
entityToSave As IEntity2,
restriction As IPredicateExpression,
refetch As Boolean,
recurse As Boolean
) As Boolean
Parameters
- entityToSave
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntity2
The entity to save via this unit of work - restriction
- Type: SD.LLBLGen.Pro.ORMSupportClassesIPredicateExpression
Filter to apply during save (ignored when the entity is new). This restriction will be AND-ed
with the restriction constructed by a ConcurrencyPredicateFactory instance in entityToSave (if applicable). - refetch
- Type: SystemBoolean
When true, it will refetch the entity saved after the save action. - recurse
- Type: SystemBoolean
When true, it will save all dirty objects referenced (directly or indirectly) by this entity also.
Return Value
Type:
Booleantrue if the entity is accepted, false if the entity is rejected (already added for a similar action)
See Also