Attaches the specified Entity to the current unit of work using the requested
mode for attachment
Namespace:
Mindscape.LightSpeedAssembly: Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)
Syntax
C# |
---|
public abstract Entity Attach( Entity entity, AttachMode mode ) |
Visual Basic (Declaration) |
---|
Public MustOverride Function Attach ( _ entity As Entity, _ mode As AttachMode _ ) As Entity |
Parameters
- entity
- Type: Mindscape.LightSpeed..::.Entity
The Entity to attach.
- mode
- Type: Mindscape.LightSpeed..::.AttachMode
The AttachMode to use when attaching this entity to the UnitOfWork
Return Value
An instance of the entity which has been attached to the current UnitOfWork, see the details for the AttachMode being used to determine specific behavior of the callImplements
IUnitOfWork..::.Attach(Entity, AttachMode)Remarks
If the entity is already attached to this unit of work, re-attaching it
has no effect.
Examples
CopyC#
Country country = RemoteService.GetCountryFromSessionState("Ruritania");
unitOfWork.Attach(country, AttachMode.Import);