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
- relationshipClass
Type: Microsoft.Data.Schema.SchemaModel.ModelRelationshipClass
A ModelRelationshipClass metadata object.
Return Value
Type: Microsoft.Data.Schema.SchemaModel.IModelRelationship<TFrom, TTo>
An IModelRelationship<TFrom, TTo> object.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.