EntityObject 类

定义

Entity Data Model 工具生成的实体类型的基类。Base class for entity types that are generated by the Entity Data Model tools.

public ref class EntityObject abstract : System::Data::Objects::DataClasses::StructuralObject, System::Data::Objects::DataClasses::IEntityWithChangeTracker, System::Data::Objects::DataClasses::IEntityWithKey, System::Data::Objects::DataClasses::IEntityWithRelationships
[System.Runtime.Serialization.DataContract(IsReference=true)]
[System.Serializable]
public abstract class EntityObject : System.Data.Objects.DataClasses.StructuralObject, System.Data.Objects.DataClasses.IEntityWithChangeTracker, System.Data.Objects.DataClasses.IEntityWithKey, System.Data.Objects.DataClasses.IEntityWithRelationships
[<System.Runtime.Serialization.DataContract(IsReference=true)>]
[<System.Serializable>]
type EntityObject = class
    inherit StructuralObject
    interface IEntityWithKey
    interface IEntityWithChangeTracker
    interface IEntityWithRelationships
Public MustInherit Class EntityObject
Inherits StructuralObject
Implements IEntityWithChangeTracker, IEntityWithKey, IEntityWithRelationships
继承
EntityObject
属性
实现

构造函数

EntityObject()

初始化 EntityObject 类的新实例。Initializes a new instance of the EntityObject class.

属性

EntityKey

获取或设置此对象的键。Gets or sets the key for this object.

EntityState

获取对象的实体状态。Gets the entity state of the object.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetValidValue<T>(T, String, Boolean, Boolean)

返回指定属性的复杂类型。Returns a complex type for the specified property.

(继承自 StructuralObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnPropertyChanged(String)

引发 PropertyChanged 事件。Raises the PropertyChanged event.

(继承自 StructuralObject)
OnPropertyChanging(String)

引发 PropertyChanging 事件。Raises the PropertyChanging event.

(继承自 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.

(继承自 StructuralObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

事件

PropertyChanged

在属性值更改时发生。Occurs when a property value has changed.

(继承自 StructuralObject)
PropertyChanging

在属性值更改挂起时发生。Occurs when a property value change is a pending.

(继承自 StructuralObject)

显式接口实现

IEntityWithChangeTracker.SetChangeTracker(IEntityChangeTracker)

指定用于报告属性更改的 IEntityChangeTracker 的实例。Specifies the instance of IEntityChangeTracker that is used to report property changes.

IEntityWithRelationships.RelationshipManager

获取此对象使用的关系管理器。Gets the relationship manager used by this object.

适用于