Returns an new entity object bound to the same resource as this entity object

Namespace: BrightstarDB.EntityFramework
Assembly: BrightstarDB (in BrightstarDB.dll) Version: 1.9.0.0 (1.9.0.0)

Syntax

C#
public T Become<T>()
Visual Basic
Public Function Become(Of T) As T
Visual C++
public:
generic<typename T>
T Become()
F#
member Become : unit -> 'T 

Type Parameters

T
The entity definition interface that the new entity object should implement

Return Value

Type: T
A new object that implements the entity definition interface specified by the type parameter T and that is bound to the same underlying resource as this entity object.

Remarks

This method adds one or more type properties to the underlying resource so that it becomes a resource both of the type of this entity object and of the type of entity object that it becomes. After committing changes, the resource can then be accessed through either entity collection on the context object.

Exceptions

ExceptionCondition
BrightstarDB.EntityFramework..::..MappingNotFoundExceptionRaised if T is not a registered entity definition interface type.

See Also