ObjectContext.Attach(IEntityWithKey) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當物件具有實體索引鍵時,將物件或物件圖形附加至物件內容。
public virtual void Attach (System.Data.Entity.Core.Objects.DataClasses.IEntityWithKey entity);
abstract member Attach : System.Data.Entity.Core.Objects.DataClasses.IEntityWithKey -> unit
override this.Attach : System.Data.Entity.Core.Objects.DataClasses.IEntityWithKey -> unit
Public Overridable Sub Attach (entity As IEntityWithKey)
參數
- entity
- IEntityWithKey
要附加的物件。
例外狀況
entity 是 null。
無效的實體索引鍵。