Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

DbEntityEntry(TEntity) Class

Entity Framework 5.0

Instances of this class provide access to information about and control of entities that are being tracked by the DbContext. Use the Entity or Entities methods of the context to obtain objects of this type.

System.Object
  System.Data.Entity.Infrastructure.DbEntityEntry(TEntity)

Namespace:  System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)
type DbEntityEntry<'TEntity when 'TEntity : not struct> =  class end

Type Parameters

TEntity

The type of the entity.

The DbEntityEntry(TEntity) 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 methodCollection(String)Gets an object that represents the collection navigation property from this entity to a collection of related entities.
Public methodCollection(TElement)(Expression(Func(TEntity, ICollection(TElement))))Gets an object that represents the collection navigation property from this entity to a collection of related entities.
Public methodCollection(TElement)(String)Gets an object that represents the collection navigation property from this entity to a collection of related entities.
Public methodComplexProperty(String)Gets an object that represents a complex property of this entity.
Public methodComplexProperty(TComplexProperty)(Expression(Func(TEntity, TComplexProperty)))Gets an object that represents a complex property of this entity.
Public methodComplexProperty(TComplexProperty)(String)Gets 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(TEntity) instances are considered equal if they are both entries for the same entity on the same DbContext. (Overrides Object.Equals(Object).)
Public methodEquals(DbEntityEntry(TEntity))Determines whether the specified DbEntityEntry(TEntity) is equal to this instance. Two DbEntityEntry(TEntity) 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. Changing the values in the returned dictionary will not update the values in the database. If the entity is not found in the database a null reference (Nothing in Visual Basic) is returned.
Public methodGetHashCodeReturns a hash code for this instance. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the type for the current database entity.
Public methodGetValidationResultValidates this DbEntityEntry(TEntity) instance and returns validation result.
Public methodMember(String)Gets 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.
Public methodMember(TMember)(String)Gets 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(TEntity, TProperty). Collection navigation property: DbCollectionEntry(TEntity, TElement). Primitive/scalar property: DbPropertyEntry(TEntity, TProperty). Complex property: DbComplexPropertyEntry(TEntity, TComplexProperty).
Protected methodMemberwiseClone (Inherited from Object.)
Public methodProperty(String)Gets an object that represents a scalar or complex property of this entity.
Public methodProperty(TProperty)(Expression(Func(TEntity, TProperty)))Gets an object that represents a scalar or complex property of this entity.
Public methodProperty(TProperty)(String)Gets an object that represents a scalar or complex property of this entity.
Public methodReference(String)Gets an object that represents the reference (non-collection) navigation property from this entity to another entity.
Public methodReference(TProperty)(Expression(Func(TEntity, TProperty)))Gets an object that represents the reference (i.e. non-collection) navigation property from this entity to another entity.
Public methodReference(TProperty)(String)Gets 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 methodToStringReturns a string representation of the database entity values. (Overrides Object.ToString().)
Top
  NameDescription
Public operatorStatic memberImplicit(DbEntityEntry(TEntity) to DbEntityEntry)Returns a new instance of the non-generic DbEntityEntry class for the tracked entity 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.