Share via


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

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;

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;

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