Export (0) Print
Expand All

DbReferenceEntry<TEntity, TProperty> Class

Entity Framework 5.0

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

System.Object
  System.Data.Entity.Infrastructure.DbMemberEntry<TEntity, TProperty>
    System.Data.Entity.Infrastructure.DbReferenceEntry<TEntity, TProperty>

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

public class DbReferenceEntry<TEntity, TProperty> : DbMemberEntry<TEntity, TProperty>
where TEntity : class

Type Parameters

TEntity

The type of the entity to which this property belongs.

TProperty

The type of the property.

The DbReferenceEntry<TEntity, TProperty> 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 entity 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 entity from the database. If the entity already exists in the context, then it will not overwritten with values from the database.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodQueryReturns the query that would be used to load this entity from the database. The returned query can be modified using LINQ to perform filtering or operations in the database.
Public methodToStringReturns a string representation of the database property values. (Inherited from DbMemberEntry<TEntity, TProperty>.)
Top

  NameDescription
Public operatorStatic memberImplicit(DbReferenceEntry<TEntity, TProperty> to DbReferenceEntry) Returns a new instance of the non-generic DbReferenceEntry 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.
Show:
© 2014 Microsoft