NavigationBuilder<TSource,TTarget> Class
Definition
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.
Provides a simple API for configuring a IMutableNavigation or a IMutableSkipNavigation.
public class NavigationBuilder<TSource,TTarget> : Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder where TSource : class where TTarget : class
type NavigationBuilder<'Source, 'arget (requires 'Source : null and 'arget : null)> = class
inherit NavigationBuilder
Public Class NavigationBuilder(Of TSource, TTarget)
Inherits NavigationBuilder
Type Parameters
- TSource
- TTarget
- Inheritance
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<TSource,TTarget>(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. (Inherited from NavigationBuilder) |
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. |
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. (Inherited from NavigationBuilder) |
HasAnnotation(String, Object) |
Adds or updates an annotation on the navigation property. If an annotation
with the key specified in |
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. (Inherited from NavigationBuilder) |
IInfrastructure<IConventionSkipNavigationBuilder>.Instance |
The internal builder being used to configure the skip navigation. (Inherited from NavigationBuilder) |
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
Entity Framework