Interface IConventionSkipNavigation
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents a navigation property that is part of a relationship that is forwarded through a third entity type.
public interface IConventionSkipNavigation : IReadOnlySkipNavigation, IConventionNavigationBase, IReadOnlyNavigationBase, IConventionPropertyBase, IReadOnlyPropertyBase, IConventionAnnotatable, 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, ISkipNavigation represents a read-only view of the same metadata.
See Model building conventions for more information and examples.
Properties
Builder
Gets the builder that can be used to configure this property.
IConventionSkipNavigationBuilder Builder { get; }
Property Value
Exceptions
- InvalidOperationException
If the skip navigation has been removed from the model.
DeclaringEntityType
Gets the type that this navigation property belongs to.
IConventionEntityType DeclaringEntityType { get; }
Property Value
ForeignKey
Gets the foreign key to the join type.
IConventionForeignKey? ForeignKey { get; }
Property Value
Inverse
Gets the inverse skip navigation.
IConventionSkipNavigation? Inverse { get; }
Property Value
JoinEntityType
Gets the join type used by the foreign key.
IConventionEntityType? JoinEntityType { get; }
Property Value
TargetEntityType
Gets the entity type that this navigation property will hold an instance(s) of.
IConventionEntityType TargetEntityType { get; }
Property Value
Methods
GetForeignKeyConfigurationSource()
Returns the configuration source for ForeignKey.
ConfigurationSource? GetForeignKeyConfigurationSource()
Returns
- ConfigurationSource?
The configuration source for ForeignKey.
GetInverseConfigurationSource()
Returns the configuration source for Inverse.
ConfigurationSource? GetInverseConfigurationSource()
Returns
- ConfigurationSource?
The configuration source for Inverse.
SetForeignKey(IConventionForeignKey?, bool)
Sets the foreign key.
IConventionForeignKey? SetForeignKey(IConventionForeignKey? foreignKey, bool fromDataAnnotation = false)
Parameters
foreignKey
IConventionForeignKeyThe foreign key. Passing null will result in there being no foreign key associated.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionForeignKey
The new foreign key.
SetInverse(IConventionSkipNavigation?, bool)
Sets the inverse skip navigation.
IConventionSkipNavigation? SetInverse(IConventionSkipNavigation? inverse, bool fromDataAnnotation = false)
Parameters
inverse
IConventionSkipNavigationThe inverse skip navigation. Passing null will result in there being no inverse navigation property defined.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.