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

-또는-

관련 끝에 연결된 개체가 원본 개체와 동일 ObjectContext 하지 않습니다.

-또는-

연결 중인 개체가 Added 또는 Deleted 상태에 있습니다.

설명

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

적용 대상