DbEntityEntry<TEntity>.Collection Method

Definition

Overloads

Collection(String)

Gets an object that represents the collection navigation property from this entity to a collection of related entities.

Collection<TElement>(Expression<Func<TEntity,ICollection<TElement>>>)

Gets an object that represents the collection navigation property from this entity to a collection of related entities.

Collection<TElement>(String)

Gets an object that represents the collection navigation property from this entity to a collection of related entities.

Collection(String)

Gets an object that represents the collection navigation property from this entity to a collection of related entities.

public System.Data.Entity.Infrastructure.DbCollectionEntry Collection (string navigationProperty);
member this.Collection : string -> System.Data.Entity.Infrastructure.DbCollectionEntry
Public Function Collection (navigationProperty As String) As DbCollectionEntry

Parameters

navigationProperty
String

The name of the navigation property.

Returns

An object representing the navigation property.

Applies to

Collection<TElement>(Expression<Func<TEntity,ICollection<TElement>>>)

Gets an object that represents the collection navigation property from this entity to a collection of related entities.

public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.ICollection<TElement>>> navigationProperty) where TElement : class;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.ICollection<TElement>>> navigationProperty) where TElement : class;
member this.Collection : System.Linq.Expressions.Expression<Func<'Entity, System.Collections.Generic.ICollection<'Element>>> -> System.Data.Entity.Infrastructure.DbCollectionEntry<'Entity, 'Element (requires 'Entity : null and 'Element : null)> (requires 'Element : null)
Public Function Collection(Of TElement As Class) (navigationProperty As Expression(Of Func(Of TEntity, ICollection(Of TElement)))) As DbCollectionEntry(Of TEntity, TElement)

Type Parameters

TElement

The type of elements in the collection.

Parameters

navigationProperty
Expression<Func<TEntity,ICollection<TElement>>>

An expression representing the navigation property.

Returns

An object representing the navigation property.

Attributes

Applies to

Collection<TElement>(String)

Gets an object that represents the collection navigation property from this entity to a collection of related entities.

public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement> (string navigationProperty) where TElement : class;
member this.Collection : string -> System.Data.Entity.Infrastructure.DbCollectionEntry<'Entity, 'Element (requires 'Entity : null and 'Element : null)> (requires 'Element : null)
Public Function Collection(Of TElement As Class) (navigationProperty As String) As DbCollectionEntry(Of TEntity, TElement)

Type Parameters

TElement

The type of elements in the collection.

Parameters

navigationProperty
String

The name of the navigation property.

Returns

An object representing the navigation property.

Applies to