IRelatedEnd.Attach 메서드

정의

연결된 두 개체 간의 관계를 정의합니다.

오버로드

Attach(IEntityWithRelationships)

연결된 두 개체 간의 관계를 정의합니다.

Attach(Object)

연결된 두 개체 간의 관계를 정의합니다.

Attach(IEntityWithRelationships)

연결된 두 개체 간의 관계를 정의합니다.

public:
 void Attach(System::Data::Objects::DataClasses::IEntityWithRelationships ^ entity);
public void Attach (System.Data.Objects.DataClasses.IEntityWithRelationships entity);
abstract member Attach : System.Data.Objects.DataClasses.IEntityWithRelationships -> unit
Public Sub Attach (entity As IEntityWithRelationships)

매개 변수

entity
IEntityWithRelationships

연결 중인 개체입니다. entityIEntityWithRelationships를 구현해야 합니다.

설명

Attach 메서드는 둘 다 동일한 ObjectContext 인스턴스에 연결된 두 개체 간의 관계를 정의하는 데 사용됩니다.

클래스는 RelatedEnd 메서드를 명시적으로 구현합니다 Attach . 클래스는 EntityCollection<TEntity> 이 구현을 사용하여 연결된 소스 개체와 컬렉션에 연결된 개체 간의 관계를 정의합니다. 자세한 내용은 개체 연결 및 분리를 참조하세요.

적용 대상

Attach(Object)

연결된 두 개체 간의 관계를 정의합니다.

public:
 void Attach(System::Object ^ entity);
public void Attach (object entity);
abstract member Attach : obj -> unit
Public Sub Attach (entity As Object)

매개 변수

entity
Object

연결 중인 개체입니다.

설명

구현 IEntityWithRelationships하지 않는 엔터티 클래스에 대해 이 메서드 오버로드를 사용합니다. 구현IEntityWithRelationships하는 Attach 엔터티 클래스에 메서드를 사용합니다.

Attach 메서드는 둘 다 동일한 ObjectContext 인스턴스에 연결된 두 개체 간의 관계를 정의하는 데 사용됩니다.

클래스는 RelatedEnd 메서드를 명시적으로 구현합니다 Attach . 클래스는 EntityCollection<TEntity> 이 구현을 사용하여 연결된 소스 개체와 컬렉션에 연결된 개체 간의 관계를 정의합니다. 자세한 내용은 개체 연결 및 분리를 참조하세요.

적용 대상