DbEntityEntry<TEntity>::Collection Method
Gets an object that represents the collection navigation property from this entity to a collection of related entities.
Assembly: EntityFramework (in EntityFramework.dll)
| Name | Description | |
|---|---|---|
![]() | 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. |
DbEntityEntry<TEntity>::Collection Method (String^)
Gets an object that represents the collection navigation property from this entity to a collection of related entities.
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.
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.
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.
