Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DbCollectionEntry<TEntity, TElement> Class

Entity Framework 5.0

Instances of this class are returned from the Collection method of DbEntityEntry<TEntity> and allow operations such as loading to be performed on the entity's collection navigation properties.

System::Object
  System.Data.Entity.Infrastructure::DbMemberEntry<TEntity, ICollection<TElement>>
    System.Data.Entity.Infrastructure::DbCollectionEntry<TEntity, TElement>

Namespace:  System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)
generic<typename TEntity, typename TElement>
where TEntity : ref class 
public ref class DbCollectionEntry : public DbMemberEntry<TEntity, ICollection<TElement>^>

Type Parameters

TEntity

The type of the entity to which this property belongs.

TElement

The type of the element in the collection of entities.

The DbCollectionEntry<TEntity, TElement> type exposes the following members.

  NameDescription
Public propertyCurrentValueGets or sets the current value of the navigation property. The current value is the entity that the navigation property references. (Overrides DbMemberEntry<TEntity, TProperty>::CurrentValue.)
Public propertyEntityEntryThe DbEntityEntry<TEntity> to which this navigation property belongs. (Overrides DbMemberEntry<TEntity, TProperty>::EntityEntry.)
Public propertyIsLoadedGets a value indicating whether the collection of entities has been loaded from the database.
Public propertyNameGets the property name. (Overrides DbMemberEntry<TEntity, TProperty>::Name.)
Top
  NameDescription
Public methodEqualsReturns whether the specified query is equal to the current query. (Inherited from DbMemberEntry<TEntity, TProperty>.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCodeReturns the hash function for the specified query. (Inherited from DbMemberEntry<TEntity, TProperty>.)
Public methodGetTypeGets the type for the current query. (Inherited from DbMemberEntry<TEntity, TProperty>.)
Public methodGetValidationErrorsValidates this property. (Inherited from DbMemberEntry<TEntity, TProperty>.)
Public methodLoadLoads the collection of entities from the database. Note that entities that already exist in the context are not overwritten with values from the database.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodQueryReturns the query that would be used to load this collection from the database. The returned query can be modified using LINQ to perform filtering or operations in the database, such as counting the number of entities in the collection in the database without actually loading them.
Public methodToStringReturns a string representation of the database property values. (Inherited from DbMemberEntry<TEntity, TProperty>.)
Top
  NameDescription
Public operatorStatic memberImplicit(DbCollectionEntry<TEntity, TElement> to DbCollectionEntry)Returns a new instance of the non-generic DbCollectionEntry class for the navigation property represented by this object.
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.