다음을 통해 공유


RelationshipManager.InitializeRelatedCollection<TTargetEntity> 메서드

정의

기본 생성자로 만든 기존 EntityCollection을 사용하여 제공된 관계 및 대상 역할 이름을 사용하여 초기화합니다. 이 메서드는 역직렬화 중에만 사용하도록 설계되었으며 제공된 EntityCollection이 이미 초기화되었거나 관계 관리자가 ObjectContext에 이미 연결되어 있는 경우 예외를 throw합니다.

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public void InitializeRelatedCollection<TTargetEntity> (string relationshipName, string targetRoleName, System.Data.Entity.Core.Objects.DataClasses.EntityCollection<TTargetEntity> entityCollection) where TTargetEntity : class;
member this.InitializeRelatedCollection : string * string * System.Data.Entity.Core.Objects.DataClasses.EntityCollection<'argetEntity (requires 'argetEntity : null)> -> unit (requires 'argetEntity : null)
Public Sub InitializeRelatedCollection(Of TTargetEntity As Class) (relationshipName As String, targetRoleName As String, entityCollection As EntityCollection(Of TTargetEntity))

형식 매개 변수

TTargetEntity

targetRoleName으로 표시되는 엔터티의 형식

매개 변수

relationshipName
String

관계 이름입니다.

targetRoleName
String

대상 역할 이름입니다.

entityCollection
EntityCollection<TTargetEntity>

기존 EntityCollection입니다.

특성

적용 대상