Share via


EntityObject Class

Definition

This is the class is the basis for all perscribed EntityObject classes.

[System.Runtime.Serialization.DataContract(IsReference=true)]
[System.Serializable]
public abstract class EntityObject : System.Data.Entity.Core.Objects.DataClasses.StructuralObject, System.Data.Entity.Core.Objects.DataClasses.IEntityWithChangeTracker, System.Data.Entity.Core.Objects.DataClasses.IEntityWithKey, System.Data.Entity.Core.Objects.DataClasses.IEntityWithRelationships
type EntityObject = class
    inherit StructuralObject
    interface IEntityWithKey
    interface IEntityWithChangeTracker
    interface IEntityWithRelationships
Public MustInherit Class EntityObject
Inherits StructuralObject
Implements IEntityWithChangeTracker, IEntityWithKey, IEntityWithRelationships
Inheritance
EntityObject
Attributes
Implements

Constructors

EntityObject()

Fields

EntityKeyPropertyName

Public constant name used for change tracking Providing this definition allows users to use this constant instead of hard-coding the string. This helps to ensure the property name is correct and allows faster comparisons in places where we are looking for this specific string. Users can still use the case-sensitive string directly instead of the constant, it will just be slightly slower on comparison. Including the dash (-) character around the name ensures that this will not conflict with a real data property, because -EntityKey- is not a valid identifier name

(Inherited from StructuralObject)

Properties

EntityKey

Gets or sets the key for this object.

EntityState

Gets the entity state of the object.

Methods

GetValidValue<T>(T, String, Boolean, Boolean)

Returns a complex type for the specified property.

(Inherited from StructuralObject)
OnPropertyChanged(String)

Raises the PropertyChanged event.

(Inherited from StructuralObject)
OnPropertyChanging(String)

Raises the PropertyChanging event.

(Inherited from StructuralObject)
ReportPropertyChanged(String)

Notifies the change tracker that a property has changed.

ReportPropertyChanging(String)

Notifies the change tracker that a property change is pending.

SetValidValue<T>(T, T, String)

Sets a complex object for the specified property.

(Inherited from StructuralObject)

Events

PropertyChanged

Notification that a property has been changed.

(Inherited from StructuralObject)
PropertyChanging

Notification that a property is about to be changed.

(Inherited from StructuralObject)

Explicit Interface Implementations

IEntityWithChangeTracker.SetChangeTracker(IEntityChangeTracker)

Used by the ObjectStateManager to attach or detach this EntityObject to the cache.

IEntityWithRelationships.RelationshipManager

Returns the container for the lazily created relationship navigation property objects, collections and refs.

Applies to