EntityEntry<TEntity>.Collection Method
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.
Overloads
Collection<TProperty>(INavigationBase) |
Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities. |
Collection<TProperty>(Expression<Func<TEntity,IEnumerable<TProperty>>>) |
Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities. |
Collection<TProperty>(String) |
Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities. |
Collection<TProperty>(INavigationBase)
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities.
public virtual Microsoft.EntityFrameworkCore.ChangeTracking.CollectionEntry<TEntity,TProperty> Collection<TProperty> (Microsoft.EntityFrameworkCore.Metadata.INavigationBase navigation) where TProperty : class;
override this.Collection : Microsoft.EntityFrameworkCore.Metadata.INavigationBase -> Microsoft.EntityFrameworkCore.ChangeTracking.CollectionEntry<'Entity, 'Property (requires 'Entity : null and 'Property : null)> (requires 'Property : null)
Public Overridable Function Collection(Of TProperty As Class) (navigation As INavigationBase) As CollectionEntry(Of TEntity, TProperty)
Type Parameters
- TProperty
Parameters
- navigation
- INavigationBase
The collection navigation.
Returns
An object that exposes change tracking information and operations for the given navigation property.
Remarks
See Accessing tracked entities in EF Core and Changing foreign keys and navigations for more information and examples.
Applies to
Collection<TProperty>(Expression<Func<TEntity,IEnumerable<TProperty>>>)
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities.
public virtual Microsoft.EntityFrameworkCore.ChangeTracking.CollectionEntry<TEntity,TProperty> Collection<TProperty> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TProperty>>> propertyExpression) where TProperty : class;
override this.Collection : System.Linq.Expressions.Expression<Func<'Entity, seq<'Property>>> -> Microsoft.EntityFrameworkCore.ChangeTracking.CollectionEntry<'Entity, 'Property (requires 'Entity : null and 'Property : null)> (requires 'Property : null)
Public Overridable Function Collection(Of TProperty As Class) (propertyExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TProperty)))) As CollectionEntry(Of TEntity, TProperty)
Type Parameters
- TProperty
Parameters
- propertyExpression
- Expression<Func<TEntity,IEnumerable<TProperty>>>
A lambda expression representing the collection navigation to access information and operations for.
Returns
An object that exposes change tracking information and operations for the given navigation property.
Remarks
See Accessing tracked entities in EF Core and Changing foreign keys and navigations for more information and examples.
Applies to
Collection<TProperty>(String)
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities.
public virtual Microsoft.EntityFrameworkCore.ChangeTracking.CollectionEntry<TEntity,TProperty> Collection<TProperty> (string propertyName) where TProperty : class;
override this.Collection : string -> Microsoft.EntityFrameworkCore.ChangeTracking.CollectionEntry<'Entity, 'Property (requires 'Entity : null and 'Property : null)> (requires 'Property : null)
Public Overridable Function Collection(Of TProperty As Class) (propertyName As String) As CollectionEntry(Of TEntity, TProperty)
Type Parameters
- TProperty
Parameters
- propertyName
- String
The name of the navigation property.
Returns
An object that exposes change tracking information and operations for the given navigation property.
Remarks
See Accessing tracked entities in EF Core and Changing foreign keys and navigations for more information and examples.
Applies to
Entity Framework