ObjectStateEntry Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents either a entity, entity stub or relationship
public abstract class ObjectStateEntry : System.Data.Entity.Core.Objects.DataClasses.IEntityChangeTracker
type ObjectStateEntry = class
interface IEntityChangeTracker
Public MustInherit Class ObjectStateEntry
Implements IEntityChangeTracker
- Inheritance
-
ObjectStateEntry
- Implements
Properties
CurrentValues |
Gets the current property values of the object or relationship associated with this ObjectStateEntry . |
Entity |
Gets the entity object. |
EntityKey |
Gets the entity key. |
EntitySet |
Gets the EntitySetBase for the object or relationship. |
IsRelationship |
Gets a value that indicates whether the ObjectStateEntry represents a relationship. |
ObjectStateManager |
Gets the ObjectStateManager for the ObjectStateEntry . |
OriginalValues |
Gets the read-only version of original values of the object or relationship. |
RelationshipManager |
Gets the RelationshipManager instance for the object represented by entry. |
State |
Gets the state of the ObjectStateEntry. |
Methods
AcceptChanges() |
Accepts the current values as original values. |
ApplyCurrentValues(Object) |
Sets the current values of the entry to match the property values of a supplied object. |
ApplyOriginalValues(Object) |
Sets the original values of the entry to match the property values of a supplied object. |
ChangeState(EntityState) |
Changes state of the entry to the specified EntityState value. |
Delete() |
Marks an entity as deleted. |
GetModifiedProperties() |
Returns the names of an object’s properties that have changed since the last time SaveChanges() was called. |
GetUpdatableOriginalValues() |
Gets the updatable version of original values of the object associated with this ObjectStateEntry . |
IsPropertyChanged(String) |
Uses DetectChanges to determine whether or not the current value of the property with the given name is different from its original value. Note that this may be different from the property being marked as modified since a property which has not changed can still be marked as modified. |
RejectPropertyChanges(String) |
Rejects any changes made to the property with the given name since the property was last loaded, attached, saved, or changes were accepted. The orginal value of the property is stored and the property will no longer be marked as modified. |
SetModified() |
Sets the state of the object or relationship to modify. |
SetModifiedProperty(String) |
Marks the specified property as modified. |
Explicit Interface Implementations
IEntityChangeTracker.EntityComplexMemberChanged(String, Object, String) |
Used to report that a complex property has been changed The property value that was cached during EntityMemberChanging is now added to OriginalValues |
IEntityChangeTracker.EntityComplexMemberChanging(String, Object, String) |
Used to report that a complex property is about to change The current value of the specified property is cached when this method is called. |
IEntityChangeTracker.EntityMemberChanged(String) |
Used to report that a scalar entity property has been changed The property value that was cached during EntityMemberChanging is now added to OriginalValues |
IEntityChangeTracker.EntityMemberChanging(String) |
Used to report that a scalar entity property is about to change The current value of the specified property is cached when this method is called. |
IEntityChangeTracker.EntityState |
Returns the EntityState from the ObjectStateEntry |
Applies to
Entity Framework