RelatedEnd.ValidateEntityForAttach<TEntity> 메서드

정의

개체를 로컬 컬렉션 또는 참조에 연결할 수 있는지 여부를 결정합니다.

protected public:
generic <typename TEntity>
 void ValidateEntityForAttach(TEntity entity, int index, bool allowCollection);
protected internal void ValidateEntityForAttach<TEntity> (TEntity entity, int index, bool allowCollection);
member this.ValidateEntityForAttach : 'Entity * int * bool -> unit
Protected Friend Sub ValidateEntityForAttach(Of TEntity) (entity As TEntity, index As Integer, allowCollection As Boolean)

형식 매개 변수

TEntity

유효성을 검사할 개체의 형식입니다.

매개 변수

entity
TEntity

유효성이 검사되는 개체입니다.

index
Int32

컬렉션에서 유효성이 검사되는 개체의 위치입니다.

allowCollection
Boolean

개체가 컬렉션의 멤버인지 여부를 나타냅니다.

예외

연결 중인 개체가 null인 경우.

또는

관련 end에 연결되는 개체가 소스 개체와 동일한 ObjectContext에 없는 경우

또는

연결되는 개체가 Added 또는 Deleted 상태인 경우

설명

메서드는 ValidateEntityForAttach<TEntity> 연결 작업 중에 Object Services에서 호출됩니다.

적용 대상