Skip to main content

Definition

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

Syntax

Microsoft.OData.Mcp.Core.Models.EdmNavigationPropertyBinding

Summary

Represents a navigation property binding in an entity set.

Remarks

Navigation property bindings establish the connection between navigation properties and the entity sets that contain the target entities. They are essential for defining how relationships are resolved in the OData service.

Constructors

.ctor

Initializes a new instance of the EdmNavigationPropertyBinding class.

Syntax

public EdmNavigationPropertyBinding()

.ctor

Initializes a new instance of the EdmNavigationPropertyBinding class with the specified path and target.

Syntax

public EdmNavigationPropertyBinding(string path, string target)

Parameters

NameTypeDescription
pathstringThe path of the navigation property.
targetstringThe target entity set name.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when path or target is null or whitespace.

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

Path

Gets or sets the path of the navigation property.

Syntax

public required string Path { get; set; }

Property Value

Type: string The navigation property path, which may be a simple property name or a more complex path.

Remarks

The path identifies which navigation property this binding applies to. For simple cases, this is just the property name. For more complex scenarios involving inheritance or containment, the path may include type casts or additional segments.

Target

Gets or sets the target entity set name.

Syntax

public required string Target { get; set; }

Property Value

Type: string The name of the entity set that contains the target entities for this navigation property.

Remarks

When following this navigation property, the target entities will be found in the entity set specified by this property. The target entity set must be defined in the same entity container.

Methods

Equals Override

Determines whether the specified object is equal to the current navigation property binding.

Syntax

public override bool Equals(object obj)

Parameters

NameTypeDescription
objobject?The object to compare with the current navigation property binding.

Returns

Type: bool true if the specified object is equal to the current navigation property binding; otherwise, false.

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Override

Returns a hash code for the current navigation property binding.

Syntax

public override int GetHashCode()

Returns

Type: int A hash code for the current navigation property binding.

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Override

Returns a string representation of the navigation property binding.

Syntax

public override string ToString()

Returns

Type: string A string showing the path and target relationship.

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?