IModelElement.GetRelationship<TFrom, TTo> Method (ModelRelationshipClass)

Returns a relationship where the two related elements are of the specified types.

Namespace:  Microsoft.Data.Schema.SchemaModel
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Function GetRelationship(Of TFrom As {Class, IModelElement}, TTo As {Class, IModelElement}) ( _
    relationshipClass As ModelRelationshipClass _
) As IModelRelationship(Of TFrom, TTo)
IModelRelationship<TFrom, TTo> GetRelationship<TFrom, TTo>(
    ModelRelationshipClass relationshipClass
)
where TFrom : class, IModelElement
where TTo : class, IModelElement
generic<typename TFrom, typename TTo>
where TFrom : ref class, IModelElement
where TTo : ref class, IModelElement
IModelRelationship<TFrom, TTo>^ GetRelationship(
    ModelRelationshipClass^ relationshipClass
)
abstract GetRelationship : 
        relationshipClass:ModelRelationshipClass -> IModelRelationship<'TFrom, 'TTo>  when 'TFrom : not struct and IModelElement when 'TTo : not struct and IModelElement
JScript does not support generic types or methods.

Type Parameters

  • TFrom
    The Type of the relating (or left) element.
  • TTo
    A Type of the related (or right) element.

Parameters

Return Value

Type: Microsoft.Data.Schema.SchemaModel.IModelRelationship<TFrom, TTo>
An IModelRelationship<TFrom, TTo> object.

.NET Framework Security

See Also

Reference

IModelElement Interface

GetRelationship Overload

Microsoft.Data.Schema.SchemaModel Namespace

ModelRelationshipClass

IModelRelationship<TFrom, TTo>