Table of Contents

Interface IMutableNavigation

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.dll

Represents a navigation property which can be used to navigate a relationship.

public interface IMutableNavigation : IReadOnlyNavigation, IMutableNavigationBase, IReadOnlyNavigationBase, IMutablePropertyBase, IReadOnlyPropertyBase, IMutableAnnotatable, IReadOnlyAnnotatable
Inherited Members
Extension Methods

Remarks

This interface is used during model creation and allows the metadata to be modified. Once the model is built, INavigation represents a read-only view of the same metadata.

See Modeling entity types and relationships for more information and examples.

Properties

DeclaringEntityType

Gets the type that this navigation property belongs to.

IMutableEntityType DeclaringEntityType { get; }

Property Value

IMutableEntityType

ForeignKey

Gets the foreign key that defines the relationship this navigation property will navigate.

IMutableForeignKey ForeignKey { get; }

Property Value

IMutableForeignKey

Inverse

Gets the inverse navigation.

IMutableNavigation? Inverse { get; }

Property Value

IMutableNavigation

TargetEntityType

Gets the entity type that this navigation property will hold an instance(s) of.

IMutableEntityType TargetEntityType { get; }

Property Value

IMutableEntityType

Methods

SetInverse(MemberInfo?)

Sets the inverse navigation.

IMutableNavigation? SetInverse(MemberInfo? inverse)

Parameters

inverse MemberInfo

The inverse navigation property. Passing null will result in there being no inverse navigation property defined.

Returns

IMutableNavigation

The inverse navigation.

SetInverse(string?)

Sets the inverse navigation.

IMutableNavigation? SetInverse(string? inverseName)

Parameters

inverseName string

The name of the inverse navigation property. Passing null will result in there being no inverse navigation property defined.

Returns

IMutableNavigation

The inverse navigation.