DbEntityEntry<TEntity>.Collection Method

 

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

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodCollection(String)

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

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

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

System_CAPS_pubmethodCollection<TElement>(String)

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


DbEntityEntry<TEntity>.Collection Method (String)

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

public DbCollectionEntry Collection(
	string navigationProperty
)

Parameters

navigationProperty
Type: System.String

The name of the navigation property.

Return Value

Type: System.Data.Entity.Infrastructure.DbCollectionEntry

An object representing the navigation property.


DbEntityEntry<TEntity>.Collection<TElement> Method (Expression<Func<TEntity, ICollection<TElement>>>)

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

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public DbCollectionEntry<TEntity, TElement> Collection<TElement>(
	Expression<Func<TEntity, ICollection<TElement>>> navigationProperty
)
where TElement : class

Parameters

navigationProperty
Type: System.Linq.Expressions.Expression<Func<TEntity, ICollection<TElement>>>

An expression representing the navigation property.

Return Value

Type: System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity, TElement>

An object representing the navigation property.

Type Parameters

TElement

The type of elements in the collection.


DbEntityEntry<TEntity>.Collection<TElement> Method (String)

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

public DbCollectionEntry<TEntity, TElement> Collection<TElement>(
	string navigationProperty
)
where TElement : class

Parameters

navigationProperty
Type: System.String

The name of the navigation property.

Return Value

Type: System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity, TElement>

An object representing the navigation property.

Type Parameters

TElement

The type of elements in the collection.