다음을 통해 공유


MutableEntityTypeExtensions.GetOrAddForeignKey 메서드

정의

오버로드

GetOrAddForeignKey(IMutableEntityType, IMutableProperty, IMutableKey, IMutableEntityType)

기존 관계를 가져오거나 아직 정의되지 않은 경우 새 관계를 만듭니다.

GetOrAddForeignKey(IMutableEntityType, IReadOnlyList<IMutableProperty>, IMutableKey, IMutableEntityType)

기존 관계를 가져오거나 아직 정의되지 않은 경우 새 관계를 만듭니다.

GetOrAddForeignKey(IMutableEntityType, IMutableProperty, IMutableKey, IMutableEntityType)

기존 관계를 가져오거나 아직 정의되지 않은 경우 새 관계를 만듭니다.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey GetOrAddForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, Microsoft.EntityFrameworkCore.Metadata.IMutableKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType principalEntityType);
static member GetOrAddForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * Microsoft.EntityFrameworkCore.Metadata.IMutableKey * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
<Extension()>
Public Function GetOrAddForeignKey (entityType As IMutableEntityType, property As IMutableProperty, principalKey As IMutableKey, principalEntityType As IMutableEntityType) As IMutableForeignKey

매개 변수

entityType
IMutableEntityType

외래 키를 얻거나 추가할 엔터티 형식입니다.

property
IMutableProperty

외래 키가 정의된 속성입니다.

principalKey
IMutableKey

참조되는 기본 또는 대체 키입니다.

principalEntityType
IMutableEntityType

관계의 대상 엔터티 형식입니다. 이는 관계가 상속 계층 구조에서 파생 형식을 대상으로 하는 principalKey 경우에 정의된 형식과 다를 수 있습니다(키는 계층의 기본 형식에 정의되어 있기 때문에).

반환

기존 또는 새로 만든 외래 키입니다.

적용 대상

GetOrAddForeignKey(IMutableEntityType, IReadOnlyList<IMutableProperty>, IMutableKey, IMutableEntityType)

기존 관계를 가져오거나 아직 정의되지 않은 경우 새 관계를 만듭니다.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey GetOrAddForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IMutableKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType principalEntityType);
static member GetOrAddForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> * Microsoft.EntityFrameworkCore.Metadata.IMutableKey * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
<Extension()>
Public Function GetOrAddForeignKey (entityType As IMutableEntityType, properties As IReadOnlyList(Of IMutableProperty), principalKey As IMutableKey, principalEntityType As IMutableEntityType) As IMutableForeignKey

매개 변수

entityType
IMutableEntityType

외래 키를 얻거나 추가할 엔터티 형식입니다.

properties
IReadOnlyList<IMutableProperty>

외래 키가 정의된 속성입니다.

principalKey
IMutableKey

참조되는 기본 또는 대체 키입니다.

principalEntityType
IMutableEntityType

관계의 대상 엔터티 형식입니다. 이는 관계가 상속 계층 구조에서 파생 형식을 대상으로 하는 principalKey 경우에 정의된 형식과 다를 수 있습니다(키는 계층의 기본 형식에 정의되어 있기 때문에).

반환

기존 또는 새로 만든 외래 키입니다.

적용 대상