CollectionEntry CollectionEntry Class

Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another 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 class CollectionEntry : NavigationEntry, IInfrastructure<InternalEntityEntry>Public Class CollectionEntry
    Inherits NavigationEntry
    Implements IInfrastructure(Of InternalEntityEntry)

Inheritance Hierarchy

Inherited Members

IsLoaded,
IsLoaded,
Finder(Type),
Finder(Type),
IsModified,
IsModified,
Metadata,
Metadata,
InternalEntry,
InternalEntry,
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 the value currently assigned to this property. If the current value is set using this property, the change tracker is aware of the change and DetectChanges() is not required for the context to detect the change.

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 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 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

  • CollectionEntry(InternalEntityEntry, INavigation)
    CollectionEntry(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.

    public CollectionEntry(InternalEntityEntry internalEntry, INavigation navigation)Public Sub New(internalEntry As InternalEntityEntry, navigation As INavigation)

    Parameters

  • CollectionEntry(InternalEntityEntry, String)
    CollectionEntry(InternalEntityEntry, String)

    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.

    public CollectionEntry(InternalEntityEntry internalEntry, string name)Public Sub New(internalEntry As InternalEntityEntry, name As String)

    Parameters

Properties

  • CurrentValue
    CurrentValue

    Gets or sets the value currently assigned to this property. If the current value is set using this property, the change tracker is aware of the change and DetectChanges() is not required for the context to detect the change.

    public virtual IEnumerable CurrentValue { get; set; }Public Overridable Property CurrentValue As IEnumerable

    Property Value

    • System.Collections.IEnumerable
      System.Collections.IEnumerable

Methods

  • EnsureInitialized()
    EnsureInitialized()

    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 void EnsureInitialized()Protected Overridable Sub EnsureInitialized
  • Load()
    Load()

    Loads the 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 override void Load()Public Overrides Sub Load
  • LoadAsync(CancellationToken)
    LoadAsync(CancellationToken)

    Loads 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 override Task LoadAsync(CancellationToken cancellationToken = null)Public Overrides 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 override IQueryable Query()Public Overrides Function Query As IQueryable

    Returns

    • System.Linq.IQueryable
      System.Linq.IQueryable

Details

Assembly

Microsoft.EntityFrameworkCore.dll