Invoked by the generated class to retrieve the value of a property whose type is another entity

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

Syntax

C#
public T GetRelatedObject<T>(
	string propertyName
)
where T : class
Visual Basic
Public Function GetRelatedObject(Of T As Class) ( 
	propertyName As String
) As T
Visual C++
public:
generic<typename T>
where T : ref class
virtual T GetRelatedObject(
	String^ propertyName
) sealed
F#
abstract GetRelatedObject : 
        propertyName : string -> 'T  when 'T : not struct
override GetRelatedObject : 
        propertyName : string -> 'T  when 'T : not struct

Parameters

propertyName
Type: System..::..String
The name of the property that represents the relationship

Type Parameters

T
The type of the related entity

Return Value

Type: T
The related entity or null if there is no related entity

Implements

IEntityObject..::..GetRelatedObject<(Of <<'(T>)>>)(String)

Exceptions

ExceptionCondition
BrightstarDB.EntityFramework..::..EntityFrameworkExceptionThrown if this object is not currently attached to a context.

See Also