次の方法で共有


NavigationBuilder Class

Definition

Provides a simple API for configuring a IMutableNavigation or IMutableSkipNavigation.

public class NavigationBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionNavigationBuilder>, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSkipNavigationBuilder>
type NavigationBuilder = class
    interface IInfrastructure<IConventionSkipNavigationBuilder>
    interface IInfrastructure<IConventionNavigationBuilder>
Public Class NavigationBuilder
Implements IInfrastructure(Of IConventionNavigationBuilder), IInfrastructure(Of IConventionSkipNavigationBuilder)
Inheritance
NavigationBuilder
Derived
Implements

Remarks

Instances of this class are returned from methods when using the ModelBuilder API and it is not designed to be directly constructed in your application code.

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

Constructors

NavigationBuilder(IMutableNavigationBase)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

Metadata

The navigation being configured.

Methods

AutoInclude(Boolean)

Configures whether this navigation should be automatically included in a query.

EnableLazyLoading(Boolean)

Configures whether this navigation should be enabled for lazy-loading. Note that a property can only be lazy-loaded if a lazy-loading mechanism such as lazy-loading proxies or ILazyLoader injection has been configured.

HasAnnotation(String, Object)

Adds or updates an annotation on the navigation property. If an annotation with the key specified in annotation already exists its value will be updated.

HasField(String)

Sets a backing field to use for this navigation property.

IsRequired(Boolean)

Configures whether this navigation is required.

UsePropertyAccessMode(PropertyAccessMode)

Sets the PropertyAccessMode to use for this property.

Explicit Interface Implementations

IInfrastructure<IConventionNavigationBuilder>.Instance

The internal builder being used to configure the navigation.

IInfrastructure<IConventionSkipNavigationBuilder>.Instance

The internal builder being used to configure the skip navigation.

Extension Methods

GetInfrastructure<T>(IInfrastructure<T>)

Gets the value from a property that is being hidden using IInfrastructure<T>.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

Applies to