Click or drag to resize

EntityRepositoryDuplicateObject Method

Duplicates the object.

Namespace:  Aloe.SystemFrameworks.Domain
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public virtual EntityObject DuplicateObject(
	EntityObject obj,
	ObjectTransaction transaction = null
)

Parameters

obj
Type: Aloe.SystemFrameworks.DomainEntityObject
The object.
transaction (Optional)
Type: Aloe.SystemFrameworks.DomainObjectTransaction
Transaction

Return Value

Type: EntityObject
Exceptions
ExceptionCondition
NotSupportedException If object duplication is not supported by the repository.
Remarks
The base method duplicates the object, but does nothing about changing the natural key. For example, when duplicating a product, a new product code should be provided. Descendant methods are responsible for implementing a policy for natural key assignment. The policy is usually to clear the natural key and allow business rules to auto-assign it.
See Also