DbReferenceEntry<TEntity,TProperty> Class

Definition

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

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="FxCop rule is wrong; Database is not two words.", MessageId="Db")]
public class DbReferenceEntry<TEntity,TProperty> : System.Data.Entity.Infrastructure.DbMemberEntry<TEntity,TProperty> where TEntity : class
public class DbReferenceEntry<TEntity,TProperty> : System.Data.Entity.Infrastructure.DbMemberEntry<TEntity,TProperty> where TEntity : class
type DbReferenceEntry<'Entity, 'Property (requires 'Entity : null)> = class
    inherit DbMemberEntry<'Entity, 'Property (requires 'Entity : null)>
Public Class DbReferenceEntry(Of TEntity, TProperty)
Inherits DbMemberEntry(Of TEntity, TProperty)

Type Parameters

TEntity

The type of the entity to which this property belongs.

TProperty

The type of the property.

Inheritance
DbReferenceEntry<TEntity,TProperty>
Attributes

Properties

CurrentValue

Gets or sets the current value of the navigation property. The current value is the entity that the navigation property references.

EntityEntry

The DbEntityEntry<TEntity> to which this navigation property belongs.

IsLoaded

Gets or sets a value indicating whether the entity has been loaded from the database.

Name

Gets the property name.

Methods

Equals(Object) (Inherited from DbMemberEntry<TEntity,TProperty>)
GetHashCode() (Inherited from DbMemberEntry<TEntity,TProperty>)
GetType()

Gets the Type of the current instance.

(Inherited from DbMemberEntry<TEntity,TProperty>)
GetValidationErrors()

Validates this property.

(Inherited from DbMemberEntry<TEntity,TProperty>)
Load()

Loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

LoadAsync()

Asynchronously loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

LoadAsync(CancellationToken)

Asynchronously loads the entity from the database. Note that if the entity already exists in the context, then it will not overwritten with values from the database.

Query()

Returns 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.

ToString() (Inherited from DbMemberEntry<TEntity,TProperty>)

Operators

Implicit(DbReferenceEntry<TEntity,TProperty> to DbReferenceEntry)

Returns a new instance of the non-generic DbReferenceEntry class for the navigation property represented by this object.

Applies to