Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Return to top

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.

Return to top

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.

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

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.

Return to top

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:
generic<typename TElement>
where TElement : ref class
DbCollectionEntry<TEntity, TElement>^ Collection(
	String^ navigationProperty
)

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.

Return to top
Show: