NavigationEntry NavigationEntry Class

Provides access to change tracking and loading information for a navigation property that associates this entity to one or more other entities.

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

Syntax

Declaration

public abstract class NavigationEntry : MemberEntry, IInfrastructure<InternalEntityEntry>Public MustInherit Class NavigationEntry
    Inherits MemberEntry
    Implements IInfrastructure(Of InternalEntityEntry)

Inheritance Hierarchy

Inherited Members

InternalEntry,
InternalEntry,
CurrentValue,
CurrentValue,
EntityEntry,
EntityEntry,
IInfrastructure<InternalEntityEntry>.Instance,
Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntry>.Instance,
ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Properties summary

Gets or sets a value indicating whether the entity or entities referenced by this navigation property are known to be loaded.

Loading entities from the database using Include<TEntity, TProperty>(IQueryable<TEntity>, Expression<Func<TEntity, TProperty>>) or ThenInclude<TEntity, TPreviousProperty, TProperty>(IIncludableQueryable<TEntity, IEnumerable<TPreviousProperty>>, Expression<Func<TPreviousProperty, TProperty>>) , Load(), or LoadAsync(CancellationToken) will set this flag. Subseqent calls to Load() or LoadAsync(CancellationToken) will then be a no-op.

It is possible for IsLoaded to be false even if all related entities are loaded. This is because, depending on how entities are loaded, it is not always possible to know for sure that all entities in a related collection have been loaded. In such cases, calling Load() or LoadAsync(CancellationToken) will ensure all related entities are loaded and will set this flag to true.

Gets or sets a value indicating whether any of foreign key property values associated with this navigation property have been modified and should be updated in the database when SaveChanges() is called.

Gets the metadata that describes the facets of this property and how it maps to the database.

Methods summary

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Loads the entity or entities referenced by this navigation property, unless IsLoaded is already set to true.

Note that entities that are already being tracked are not overwritten with new data from the database.

Loads the entity or entities referenced by this navigation property, unless IsLoaded is already set to true.

Note that entities that are already being tracked are not overwritten with new data from the database.

Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

Returns the query that would be used by Load() to load entities referenced by this navigation property.

The query can be composed over using LINQ to perform filtering, counting, etc. without actually loading all entities from the database.

Constructors

  • NavigationEntry(InternalEntityEntry, INavigation)
    NavigationEntry(InternalEntityEntry, INavigation)

    This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    protected NavigationEntry(InternalEntityEntry internalEntry, INavigation navigation)Protected Sub New(internalEntry As InternalEntityEntry, navigation As INavigation)

    Parameters

  • NavigationEntry(InternalEntityEntry, String, Boolean)
    NavigationEntry(InternalEntityEntry, String, Boolean)

    This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    protected NavigationEntry(InternalEntityEntry internalEntry, string name, bool collection)Protected Sub New(internalEntry As InternalEntityEntry, name As String, collection As Boolean)

    Parameters

Properties

Methods

  • Finder(Type)
    Finder(Type)

    This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    protected virtual IEntityFinder Finder(Type entityType)Protected Overridable Function Finder(entityType As Type) As IEntityFinder

    Parameters

    • entityType
      System.Type
      System.Type

    Returns

  • Load()
    Load()

    Loads the entity or entities referenced by this navigation property, unless IsLoaded is already set to true.

    Note that entities that are already being tracked are not overwritten with new data from the database.

    public virtual void Load()Public Overridable Sub Load
  • LoadAsync(CancellationToken)
    LoadAsync(CancellationToken)

    Loads the entity or entities referenced by this navigation property, unless IsLoaded is already set to true.

    Note that entities that are already being tracked are not overwritten with new data from the database.

    Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

    public virtual Task LoadAsync(CancellationToken cancellationToken = null)Public Overridable Function LoadAsync(cancellationToken As CancellationToken = Nothing) As Task

    Parameters

    • cancellationToken
      System.Threading.CancellationToken
      System.Threading.CancellationToken

      A System.Threading.CancellationToken to observe while waiting for the task to complete.

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task

      A task that represents the asynchronous save operation.

  • Query()
    Query()

    Returns the query that would be used by Load() to load entities referenced by this navigation property.

    The query can be composed over using LINQ to perform filtering, counting, etc. without actually loading all entities from the database.

    public virtual IQueryable Query()Public Overridable Function Query As IQueryable

    Returns

    • System.Linq.IQueryable
      System.Linq.IQueryable

      The query to load related entities.

Details

Assembly

Microsoft.EntityFrameworkCore.dll