Export (0) Print
Expand All

DbEntityEntry Class

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

A non-generic version of the DbEntityEntry<TEntity> class.

System.Object
  System.Data.Entity.Infrastructure.DbEntityEntry

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

public class DbEntityEntry

The DbEntityEntry type exposes the following members.

  NameDescription
Public propertyCurrentValuesGets the current property values for the tracked entity represented by this object.
Public propertyEntityGets the entity.
Public propertyOriginalValuesGets the original property values for the tracked entity represented by this object. The original values are usually the entity's property values as they were when last queried from the database.
Public propertyStateGets or sets the state of the entity.
Top

  NameDescription
Public methodCast<TEntity>Returns a new instance of the generic DbEntityEntry<TEntity> class for the given generic type for the tracked entity represented by this object. Note that the type of the tracked entity must be compatible with the generic type or an exception will be thrown.
Public methodCollectionGets an object that represents the collection navigation property from this entity to a collection of related entities.
Public methodComplexPropertyGets an object that represents a complex property of this entity.
Public methodEquals(Object)Determines whether the specified Object is equal to this instance. Two DbEntityEntry instances are considered equal if they are both entries for the same entity on the same DbContext. (Overrides Object.Equals(Object).)
Public methodEquals(DbEntityEntry)Determines whether the specified DbEntityEntry is equal to this instance. Two DbEntityEntry instances are considered equal if they are both entries for the same entity on the same DbContext.
Protected methodFinalize (Inherited from Object.)
Public methodGetDatabaseValuesQueries the database for copies of the values of the tracked entity as they currently exist in the database. Note that changing the values in the returned dictionary will not update the values in the database. If the entity is not found in the database then null is returned.
Public methodGetDatabaseValuesAsync()Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database. Note that changing the values in the returned dictionary will not update the values in the database. If the entity is not found in the database then null is returned.
Public methodGetDatabaseValuesAsync(CancellationToken)Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database. Note that changing the values in the returned dictionary will not update the values in the database. If the entity is not found in the database then null is returned.
Public methodGetHashCodeReturns a hash code for this instance. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance.
Public methodGetValidationResultValidates this DbEntityEntry instance and returns validation result.
Public methodMemberGets an object that represents a member of the entity. The runtime type of the returned object will vary depending on what kind of member is asked for. The currently supported member types and their return types are: Reference navigation property: DbReferenceEntry. Collection navigation property: DbCollectionEntry. Primitive/scalar property: DbPropertyEntry. Complex property: DbComplexPropertyEntry.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPropertyGets an object that represents a scalar or complex property of this entity.
Public methodReferenceGets an object that represents the reference (i.e. non-collection) navigation property from this entity to another entity.
Public methodReloadReloads the entity from the database overwriting any property values with values from the database. The entity will be in the Unchanged state after calling this method.
Public methodReloadAsync()Asynchronously reloads the entity from the database overwriting any property values with values from the database. The entity will be in the Unchanged state after calling this method.
Public methodReloadAsync(CancellationToken)Asynchronously reloads the entity from the database overwriting any property values with values from the database. The entity will be in the Unchanged state after calling this method.
Public methodToStringReturns a sting representation of the DbEntityEntry. (Overrides Object.ToString().)
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