Relationship Class

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Represents a relationship between two entities.

Namespace:   Microsoft.Xrm.Sdk
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Xrm.Sdk.Relationship

Syntax

[DataContractAttribute(Name = "Relationship", Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class Relationship : IExtensibleDataObject
<DataContractAttribute(Name := "Relationship", Namespace := "https://schemas.microsoft.com/xrm/2011/Contracts")>
Public NotInheritable Class Relationship
    Implements IExtensibleDataObject

Constructors

Name Description
System_CAPS_pubmethod Relationship()

Initializes a new instance of the Relationship class.

System_CAPS_pubmethod Relationship(String)

Initializes a new instance of the Relationship class setting the schema name property.

Properties

Name Description
System_CAPS_pubproperty ExtensionData

Gets or sets the structure that contains extra data.

System_CAPS_pubproperty PrimaryEntityRole

Gets or sets the entity role: referenced or referencing.

System_CAPS_pubproperty SchemaName

Gets or sets the name of the relationship.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

Determines whether two instances are equal.(Overrides Object.Equals(Object).)

System_CAPS_pubmethod GetHashCode()

Serves as a hash function for this type.(Overrides Object.GetHashCode().)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

Returns a String that represents the current Relationship.(Overrides Object.ToString().)

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

RelationshipMetadataBase
OneToManyRelationshipMetadata
ManyToManyRelationshipMetadata
Microsoft.Xrm.Sdk Namespace
Customize entity relationship metadata

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright