RelatedEnd.ValidateOwnerForAttach 方法

定義

確保相關端所屬物件支援附加操作。

protected public:
 void ValidateOwnerForAttach();
protected internal void ValidateOwnerForAttach();
member this.ValidateOwnerForAttach : unit -> unit
Protected Friend Sub ValidateOwnerForAttach ()

例外狀況

當來源物件未附加於 時 ObjectContext,則是從查詢中 NoTracking 回傳,或不在 Modified OR Unchanged 狀態。

備註

物件服務會在執行附加操作前呼叫 ValidateOwnerForAttach 方法,以確保操作成功。

適用於