Share via


IModelSingleRelationship<TFrom, TTo> Interface

If this interface is used, there can be a single element on the right side.

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

Syntax

'Declaration
Public Interface IModelSingleRelationship(Of TFrom As {Class, IModelElement}, TTo As {Class, IModelElement}) _
    Inherits IModelRelationship(Of TFrom, TTo), IModelSingleRelationship, IModelRelationship,  _
    IModelEntity
public interface IModelSingleRelationship<TFrom, TTo> : IModelRelationship<TFrom, TTo>, 
    IModelSingleRelationship, IModelRelationship, IModelEntity
where TFrom : class, IModelElement
where TTo : class, IModelElement
generic<typename TFrom, typename TTo>
where TFrom : ref class, IModelElement
where TTo : ref class, IModelElement
public interface class IModelSingleRelationship : IModelRelationship<TFrom, TTo>, 
    IModelSingleRelationship, IModelRelationship, IModelEntity
type IModelSingleRelationship<'TFrom, 'TTo when 'TFrom : not struct and IModelElement when 'TTo : not struct and IModelElement> =  
    interface
        interface IModelRelationship<'TFrom, 'TTo>
        interface IModelSingleRelationship
        interface IModelRelationship
        interface IModelEntity
    end
JScript does not support generic types or methods.

Type Parameters

  • TFrom
  • TTo

The IModelSingleRelationship<TFrom, TTo> type exposes the following members.

Properties

  Name Description
Public property Element Gets or sets the related element. (Inherited from IModelSingleRelationship.)
Public property Element Gets or sets the related element.
Public property FromElement Gets the relating element. (Inherited from IModelRelationship.)
Public property FromElement Gets the relating element. (Inherited from IModelRelationship<TFrom, TTo>.)
Public property Model Gets the model reference. (Inherited from IModelEntity.)
Public property RelationshipClass Gets the metadata class. (Inherited from IModelRelationship.)

Top

Methods

  Name Description
Public method Clear Deletes the relationship entry, if it existed. (Inherited from IModelSingleRelationship.)
Public method GetReferencedElements() Returns the related elements. (Inherited from IModelRelationship.)
Public method GetReferencedElements() Gets a list of the related elements. (Inherited from IModelRelationship<TFrom, TTo>.)
Public method GetReferencedRelationshipEntries Returns the related relationship entries. (Inherited from IModelRelationship.)
Public method GetRelationshipEntry Returns the related relationship entry. (Inherited from IModelSingleRelationship.)
Public method RecreateRelationshipEntry() Returns a new empty relationship entry or replaces an existing one. (Inherited from IModelSingleRelationship.)
Public method RecreateRelationshipEntry(TTo) Returns a new relationship entry pointing to a specified element, or replaces any existing one.
Public method RecreateRelationshipEntry(IModelElement) Returns a new relationship entry that points to a specified element or replaces an existing one. (Inherited from IModelSingleRelationship.)

Top

See Also

Reference

Microsoft.Data.Schema.SchemaModel Namespace