Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Models Inheritance: System.Object

Syntax

Summary

Represents a referential constraint that defines the relationship between properties in a navigation property.

Remarks

Referential constraints specify how foreign key relationships work in OData, mapping properties from the source entity to properties in the target entity. They are analogous to foreign key constraints in relational databases.

Constructors

.ctor

Initializes a new instance of the EdmReferentialConstraint class.

Syntax

.ctor

Initializes a new instance of the EdmReferentialConstraint class with the specified property names.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Properties

Property

Gets or sets the name of the property in the source entity type.

Syntax

Property Value

Type: string The name of the property that acts as the foreign key in the source entity.

Remarks

This property references a property in the entity type that contains the navigation property.

ReferencedProperty

Gets or sets the name of the referenced property in the target entity type.

Syntax

Property Value

Type: string The name of the property in the target entity that is referenced by the foreign key.

Remarks

This is typically a key property in the target entity type. The relationship is established by matching the value of the Property with the ReferencedProperty.

Methods

Equals Override

Determines whether the specified object is equal to the current referential constraint.

Syntax

Parameters

Returns

Type: bool true if the specified object is equal to the current referential constraint; otherwise, false.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Override

Returns a hash code for the current referential constraint.

Syntax

Returns

Type: int A hash code for the current referential constraint.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Override

Returns a string representation of the referential constraint.

Syntax

Returns

Type: string A string showing the property mapping relationship.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?