Collection(TElement) Method (Expression(Func(TEntity, ICollection(TElement))))
Collapse the table of content
Expand the table of content

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.

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

public DbCollectionEntry<TEntity, TElement> Collection<TElement>(
	Expression<Func<TEntity, ICollection<TElement>>> navigationProperty
)
where TElement : class

Type Parameters

TElement

The type of elements in the collection.

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.
Show:
© 2016 Microsoft