共用方式為


EntityObject 類別

定義

這是所有已訂閱 EntityObject 類別的基礎。

[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
繼承
EntityObject
屬性
實作

建構函式

EntityObject()

這是所有已訂閱 EntityObject 類別的基礎。

欄位

EntityKeyPropertyName

用於變更追蹤的公用常數名稱 提供此定義可讓使用者使用此常數,而不是硬式編碼字串。 這有助於確保屬性名稱正確無誤,並允許在尋找此特定字串的位置進行更快速的比較。 使用者仍然可以直接使用區分大小寫的字串,而不是常數,比較時會稍微慢一點。 在名稱周圍包含虛線 ( ) 字元可確保這不會與實際資料屬性衝突,因為 -EntityKey- 不是有效的識別碼名稱

(繼承來源 StructuralObject)

屬性

EntityKey

取得或設定這個物件的索引鍵。

EntityState

取得物件的實體狀態。

方法

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

傳回指定之屬性的複雜類型。

(繼承來源 StructuralObject)
OnPropertyChanged(String)

引發 PropertyChanged 事件。

(繼承來源 StructuralObject)
OnPropertyChanging(String)

引發 PropertyChanging 事件。

(繼承來源 StructuralObject)
ReportPropertyChanged(String)

向變更追蹤程式通知屬性已經變更。

ReportPropertyChanging(String)

向變更追蹤程式通知屬性變更已暫止。

SetValidValue<T>(T, T, String)

設定指定之屬性的複雜物件。

(繼承來源 StructuralObject)

事件

PropertyChanged

已變更屬性的通知。

(繼承來源 StructuralObject)
PropertyChanging

即將變更屬性的通知。

(繼承來源 StructuralObject)

明確介面實作

IEntityWithChangeTracker.SetChangeTracker(IEntityChangeTracker)

由 ObjectStateManager 用來附加或卸離此 EntityObject 至快取。

IEntityWithRelationships.RelationshipManager

傳回延遲建立的關聯性導覽屬性物件、集合和 refs 的容器。

適用於