다음을 통해 공유


ObjectContext.Attach(IEntityWithKey) 메서드

정의

개체에 엔터티 키가 있으면 개체 또는 개체 그래프를 개체 컨텍스트에 연결합니다.

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

연결할 개체입니다.

예외

엔터티가 null입니다.

엔터티 키가 잘못된 경우

적용 대상