다음을 통해 공유


RelationshipManager.GetRelatedCollection<TTargetEntity> 메서드

정의

지정된 관계 이름 및 대상 역할 이름을 사용하여 관련 개체의 EntityCollection<TEntity>을 가져옵니다.

public System.Data.Entity.Core.Objects.DataClasses.EntityCollection<TTargetEntity> GetRelatedCollection<TTargetEntity>(string relationshipName, string targetRoleName) where TTargetEntity : class;
member this.GetRelatedCollection : string * string -> System.Data.Entity.Core.Objects.DataClasses.EntityCollection<'argetEntity (requires 'argetEntity : null)> (requires 'argetEntity : null)
Public Function GetRelatedCollection(Of TTargetEntity As Class) (relationshipName As String, targetRoleName As String) As EntityCollection(Of TTargetEntity)

형식 매개 변수

TTargetEntity

반환된 EntityCollection<TEntity>의 형식입니다.

매개 변수

relationshipName
String

탐색할 관계의 이름입니다. 관계 이름은 네임스페이스로 정규화되지 않습니다.

targetRoleName
String

탐색에 사용할 대상 역할의 이름입니다. 관계를 탐색할 방향을 나타냅니다.

반환

EntityCollection<TTargetEntity>

관련 개체의 EntityCollection<TEntity>입니다.

예외

지정된 역할은 대신 를 EntityReference<TEntity> 반환했습니다 EntityCollection<TEntity> .

적용 대상