Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
INavigation Interface
Definition
- Namespace:
- Microsoft.EntityFrameworkCore.Metadata
- Assembly:
- Microsoft.EntityFrameworkCore.dll
- Package:
- Microsoft.EntityFrameworkCore v1.0.6
- Package:
- Microsoft.EntityFrameworkCore v1.1.6
- Package:
- Microsoft.EntityFrameworkCore v10.0.0
- Package:
- Microsoft.EntityFrameworkCore v2.0.3
- Package:
- Microsoft.EntityFrameworkCore v2.1.11
- Package:
- Microsoft.EntityFrameworkCore v2.2.6
- Package:
- Microsoft.EntityFrameworkCore v3.0.0
- Package:
- Microsoft.EntityFrameworkCore v3.1.0
- Package:
- Microsoft.EntityFrameworkCore v5.0.0
- Package:
- Microsoft.EntityFrameworkCore v6.0.0
- Package:
- Microsoft.EntityFrameworkCore v7.0.0
- Package:
- Microsoft.EntityFrameworkCore v8.0.0
- Package:
- Microsoft.EntityFrameworkCore v9.0.0
- Source:
- INavigation.cs
- Source:
- INavigation.cs
- Source:
- INavigation.cs
- Source:
- INavigation.cs
- Source:
- INavigation.cs
- Source:
- INavigation.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a navigation property which can be used to navigate a relationship.
public interface INavigation : Microsoft.EntityFrameworkCore.Metadata.IPropertyBase
public interface INavigation : Microsoft.EntityFrameworkCore.Metadata.INavigationBase, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyNavigation
public interface INavigation : Microsoft.EntityFrameworkCore.Metadata.INavigationBase
type INavigation = interface
interface IPropertyBase
interface IAnnotatable
type INavigation = interface
interface IReadOnlyNavigation
interface IReadOnlyNavigationBase
interface IReadOnlyPropertyBase
interface IReadOnlyAnnotatable
interface INavigationBase
interface IPropertyBase
interface IAnnotatable
type INavigation = interface
interface INavigationBase
interface IPropertyBase
interface IAnnotatable
Public Interface INavigation
Implements IPropertyBase
Public Interface INavigation
Implements INavigationBase, IReadOnlyNavigation
Public Interface INavigation
Implements INavigationBase
- Derived
- Implements
Remarks
See Modeling entity types and relationships for more information and examples.
Properties
| Name | Description |
|---|---|
| ClrType |
Gets the type of value that this property-like object holds. (Inherited from IReadOnlyPropertyBase) |
| DeclaringEntityType |
Gets the entity type that this navigation property belongs to. |
| DeclaringType |
Gets the type that this property-like object belongs to. (Inherited from IReadOnlyPropertyBase) |
| FieldInfo |
Gets the FieldInfo for the underlying CLR field for this property-like object.
This may be |
| ForeignKey |
Gets the foreign key that defines the relationship this navigation property will navigate. |
| Inverse |
Gets the inverse navigation. |
| IsCollection |
Gets a value indicating whether the navigation property is a collection property. |
| IsEagerLoaded |
Determines whether this navigation should be eager loaded by default. |
| IsOnDependent |
Gets a value indicating whether the navigation property is defined on the dependent side of the underlying foreign key. |
| Item[String] |
Gets the value of the annotation with the given name, returning |
| LazyLoadingEnabled |
Determines whether this navigation should lazy-load if lazy-loading is enabled and a mechanism for lazy-loading has been configured in the model. (Inherited from IReadOnlyNavigationBase) |
| Name |
Gets the name of this property-like object. (Inherited from IReadOnlyPropertyBase) |
| PropertyInfo |
Gets the PropertyInfo for the underlying CLR property for this property-like object.
This may be |
| Sentinel |
Gets the sentinel value that indicates that this property is not set. (Inherited from IReadOnlyPropertyBase) |
| TargetEntityType |
Gets the entity type that this navigation property will hold an instance(s) of. |
Methods
| Name | Description |
|---|---|
| AddRuntimeAnnotation(String, Object) |
Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists. (Inherited from IAnnotatable) |
| AnnotationsToDebugString(Int32) |
Gets the debug string for all annotations declared on the object. (Inherited from IReadOnlyAnnotatable) |
| FindAnnotation(String) |
Gets the annotation with the given name, returning |
| FindRuntimeAnnotation(String) |
Gets the runtime annotation with the given name, returning |
| FindRuntimeAnnotationValue(String) |
Gets the value of the runtime annotation with the given name, returning |
| GetAnnotation(String) |
Gets the annotation with the given name, throwing if it does not exist. (Inherited from IReadOnlyAnnotatable) |
| GetAnnotations() |
Gets all annotations on the current object. (Inherited from IReadOnlyAnnotatable) |
| GetCollectionAccessor() |
Gets the IClrCollectionAccessor for this navigation property, if it's a collection navigation. |
| GetCurrentValueComparer() |
Gets a IComparer<T> for comparing values in tracked IUpdateEntry entries. (Inherited from IPropertyBase) |
| GetFieldName() |
Gets the name of the backing field for this property, or |
| GetGetter() |
Gets a IClrPropertyGetter for reading the value of this property. (Inherited from IPropertyBase) |
| GetIndex() |
Gets the property index for this property. (Inherited from IPropertyBase) |
| GetMemberInfo(Boolean, Boolean) |
Gets the PropertyInfo or FieldInfo that should be used to get or set a value for the given property. (Inherited from IPropertyBase) |
| GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg) |
Gets the value of the runtime annotation with the given name, adding it if one does not exist. (Inherited from IAnnotatable) |
| GetPropertyAccessMode() |
Gets the PropertyAccessMode being used for this property-like object. (Inherited from IReadOnlyPropertyBase) |
| GetRuntimeAnnotations() |
Gets all the runtime annotations on the current object. (Inherited from IAnnotatable) |
| IsIndexerProperty() |
Gets a value indicating whether this is an indexer property. An indexer property is one that is accessed through an indexer on the entity class. (Inherited from IReadOnlyPropertyBase) |
| IsShadowProperty() |
Gets a value indicating whether this is a shadow property. A shadow property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class. (Inherited from IReadOnlyPropertyBase) |
| RemoveRuntimeAnnotation(String) |
Removes the given runtime annotation from this object. (Inherited from IAnnotatable) |
| SetIsLoadedWhenNoTracking(Object) |
Calls SetLoaded(Object, String, Boolean) for a INavigationBase to mark it as loaded when a no-tracking query has eagerly loaded this relationship. (Inherited from INavigationBase) |
| SetRuntimeAnnotation(String, Object) |
Sets the runtime annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists. (Inherited from IAnnotatable) |
| ToDebugString(MetadataDebugStringOptions, Int32) |
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. (Inherited from IReadOnlyNavigation) |
Explicit Interface Implementations
| Name | Description |
|---|---|
| INavigationBase.DeclaringEntityType |
Gets the entity type that this navigation property belongs to. |
| INavigationBase.GetCollectionAccessor() |
Gets the IClrCollectionAccessor for this navigation property, if it's a collection navigation. |
| INavigationBase.Inverse |
Gets the inverse navigation. |
| INavigationBase.IsCollection |
Gets a value indicating whether the navigation property is a collection property. |
| INavigationBase.TargetEntityType |
Gets the entity type that this navigation property will hold an instance(s) of. |
| IPropertyBase.GetPropertyAccessMode() |
Gets the PropertyAccessMode being used for this property.
|
| IReadOnlyNavigationBase.DeclaringEntityType |
Gets the entity type that this navigation property belongs to. (Inherited from IReadOnlyNavigation) |
| IReadOnlyNavigationBase.Inverse |
Gets the inverse navigation. (Inherited from IReadOnlyNavigation) |
| IReadOnlyNavigationBase.IsCollection |
Gets a value indicating whether the navigation property is a collection property. (Inherited from IReadOnlyNavigation) |
| IReadOnlyNavigationBase.TargetEntityType |
Gets the entity type that this navigation property will hold an instance(s) of. (Inherited from IReadOnlyNavigation) |
| IReadOnlyPropertyBase.IsCollection |
Gets a value indicating whether the navigation property is a collection property. (Inherited from IReadOnlyNavigation) |
| IReadOnlyPropertyBase.IsShadowProperty() |
Gets a value indicating whether this is a shadow property. A shadow property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class. (Inherited from IReadOnlyNavigationBase) |
Extension Methods
| Name | Description |
|---|---|
| AnnotationsToDebugString(IAnnotatable, Int32) |
Gets the debug string for all annotations declared on the object. |
| GetAnnotation(IAnnotatable, String) |
Gets the annotation with the given name, throwing if it does not exist. |
| SetIsLoadedWhenNoTracking(INavigationBase, Object) |
Calls SetLoaded(Object, String, Boolean) for a INavigationBase to mark it as loaded when a no-tracking query has eagerly loaded this relationship. |
| FindInverse(INavigation) |
Obsolete.
Obsolete.
Gets the navigation property on the other end of the relationship. Returns null if there is no navigation property defined on the other end of the relationship. |
| GetCollectionAccessor(INavigation) |
Gets the IClrCollectionAccessor for this navigation property, which must be a collection navigation. |
| GetTargetType(INavigation) |
Obsolete.
Obsolete.
Gets the entity type that a given navigation property will hold an instance of (or hold instances of if it is a collection navigation). |
| IsCollection(INavigation) |
Obsolete.
Obsolete.
Gets a value indicating whether the given navigation property is a collection property. |
| IsDependentToPrincipal(INavigation) |
Obsolete.
Obsolete.
Gets a value indicating whether the given navigation property is the navigation property on the dependent entity type that points to the principal entity. |
| IsEagerLoaded(INavigation) |
Obsolete.
Obsolete.
Gets a value indicating whether this navigation should be eager loaded by default. |
| ToDebugString(INavigation, MetadataDebugStringOptions, Int32) |
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. |
| GetCurrentValueComparer(IPropertyBase) |
Gets a IComparer<T> for comparing values in tracked IUpdateEntry entries. |
| GetFieldName(IPropertyBase) |
Gets the name of the backing field for this property, or |
| GetGetter(IPropertyBase) |
Gets a IClrPropertyGetter for reading the value of this property. Note that it is an error to call this method for a shadow property (IsShadowProperty(IPropertyBase)) since such a property has no associated MemberInfo. |
| GetIndex(IPropertyBase) |
Gets the property index for this property. |
| GetMemberInfo(IPropertyBase, Boolean, Boolean) |
Gets the PropertyInfo or FieldInfo that should be used to get or set a value for the given property. Note that it is an error to call this method for a shadow property (IsShadowProperty(IPropertyBase)) since such a property has no associated MemberInfo. |
| GetPropertyAccessMode(IPropertyBase) |
Gets the PropertyAccessMode being used for this property.
|
| IsIndexerProperty(IPropertyBase) |
Gets a value indicating whether this is an indexer property. An indexer property is one that is accessed through an indexer on the entity class. |
| IsShadowProperty(IPropertyBase) |
Obsolete.
Gets a value indicating whether this is a shadow property. A shadow property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class. |
| GetDataAnnotations(INavigation, IAnnotationCodeGenerator) |
Gets the data annotations to configure a navigation property. |
Applies to
Entity Framework
Feedback
Was this page helpful?
