Interface IReadOnlyNavigation
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents a navigation property which can be used to navigate a relationship.
public interface IReadOnlyNavigation : IReadOnlyNavigationBase, IReadOnlyPropertyBase, IReadOnlyAnnotatable
- Inherited Members
- Extension Methods
Remarks
See Modeling entity types and relationships for more information and examples.
Properties
DeclaringEntityType
Gets the entity type that this navigation property belongs to.
IReadOnlyEntityType DeclaringEntityType { get; }
Property Value
ForeignKey
Gets the foreign key that defines the relationship this navigation property will navigate.
IReadOnlyForeignKey ForeignKey { get; }
Property Value
Inverse
Gets the inverse navigation.
IReadOnlyNavigation? Inverse { get; }
Property Value
IsOnDependent
Gets a value indicating whether the navigation property is defined on the dependent side of the underlying foreign key.
bool IsOnDependent { get; }
Property Value
TargetEntityType
Gets the entity type that this navigation property will hold an instance(s) of.
IReadOnlyEntityType TargetEntityType { get; }
Property Value
Methods
ToDebugString(MetadataDebugStringOptions, int)
Creates a human-readable representation of the given metadata.
Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.
string ToDebugString(MetadataDebugStringOptions options = MetadataDebugStringOptions.ShortDefault, int indent = 0)
Parameters
options
MetadataDebugStringOptionsOptions for generating the string.
indent
intThe number of indent spaces to use before each new line.
Returns
- string
A human-readable representation.