다음을 통해 공유


IConventionEntityTypeBuilder.CanSetPrimaryKey 메서드

정의

오버로드

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

지정된 속성을 이 엔터티 형식의 기본 키로 설정할 수 있는지 여부를 나타내는 값을 반환합니다.

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

지정된 속성을 이 엔터티 형식의 기본 키로 설정할 수 있는지 여부를 나타내는 값을 반환합니다.

CanSetPrimaryKey(IReadOnlyList<IConventionProperty>, Boolean)

지정된 속성을 이 엔터티 형식의 기본 키로 설정할 수 있는지 여부를 나타내는 값을 반환합니다.

public bool CanSetPrimaryKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
public bool CanSetPrimaryKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? properties, bool fromDataAnnotation = false);
abstract member CanSetPrimaryKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> bool
Public Function CanSetPrimaryKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As Boolean

매개 변수

properties
IReadOnlyList<IConventionProperty>

기본 키를 구성하는 속성입니다.

fromDataAnnotation
Boolean

데이터 주석을 사용하여 구성을 지정했는지 여부를 나타냅니다.

반환

true 지정된 속성을 기본 키로 설정할 수 있으면 입니다.

적용 대상

CanSetPrimaryKey(IReadOnlyList<String>, Boolean)

지정된 속성을 이 엔터티 형식의 기본 키로 설정할 수 있는지 여부를 나타내는 값을 반환합니다.

public bool CanSetPrimaryKey (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
abstract member CanSetPrimaryKey : System.Collections.Generic.IReadOnlyList<string> * bool -> bool
Public Function CanSetPrimaryKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

매개 변수

propertyNames
IReadOnlyList<String>

인덱스 구성 속성의 이름입니다.

fromDataAnnotation
Boolean

데이터 주석을 사용하여 구성을 지정했는지 여부를 나타냅니다.

반환

true 지정된 속성을 기본 키로 설정할 수 있으면 입니다.

적용 대상