Interface IConventionNavigationBuilder
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Builders
- Assembly
- Microsoft.EntityFrameworkCore.dll
Provides a simple API surface for configuring an IConventionNavigation from conventions.
This interface is typically used by database providers (and other extensions). It is generally not used in application code.
public interface IConventionNavigationBuilder : IConventionPropertyBaseBuilder<IConventionNavigationBuilder>, IConventionAnnotatableBuilder
- Inherited Members
Remarks
See Model building conventions for more information and examples.
Properties
Metadata
Gets the navigation being configured.
IConventionNavigation Metadata { get; }
Property Value
Methods
AutoInclude(bool?, bool)
Configures this navigation to be automatically included in a query.
IConventionNavigationBuilder? AutoInclude(bool? autoInclude, bool fromDataAnnotation = false)
Parameters
autoInclude
bool?A value indicating whether the navigation should be automatically included.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionNavigationBuilder
The same builder instance if the configuration was applied, null otherwise.
CanSetAutoInclude(bool?, bool)
Returns a value indicating whether this navigation can be configured to be automatically included in a query from the current configuration source.
bool CanSetAutoInclude(bool? autoInclude, bool fromDataAnnotation = false)
Parameters
autoInclude
bool?A value indicating whether the navigation should be automatically included.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetIsRequired(bool?, bool)
Returns a value indicating whether this navigation requiredness can be configured from the current configuration source.
bool CanSetIsRequired(bool? required, bool fromDataAnnotation = false)
Parameters
required
bool?A value indicating whether the navigation should be required.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetLazyLoadingEnabled(bool?, bool)
Returns a value indicating whether this navigation can be configured to enable lazy-loading from the current configuration source.
bool CanSetLazyLoadingEnabled(bool? lazyLoadingEnabled, bool fromDataAnnotation = false)
Parameters
lazyLoadingEnabled
bool?A value indicating whether the navigation should be enabled for lazy-loading.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
EnableLazyLoading(bool?, bool)
Configures this navigation to be enabled for lazy-loading.
IConventionNavigationBuilder? EnableLazyLoading(bool? lazyLoadingEnabled, bool fromDataAnnotation = false)
Parameters
lazyLoadingEnabled
bool?A value indicating whether the navigation should be enabled for lazy-loading.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionNavigationBuilder
The same builder instance if the configuration was applied, null otherwise.
IsRequired(bool?, bool)
Configures whether this navigation is required.
IConventionNavigationBuilder? IsRequired(bool? required, bool fromDataAnnotation = false)
Parameters
required
bool?A value indicating whether this is a required navigation. null to reset to default.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionNavigationBuilder
The same builder instance if the requiredness was configured, null otherwise.