PrimaryKeyAttribute 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 CLR 형식에 매핑된 엔터티 형식의 기본 키를 지정합니다.
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class PrimaryKeyAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class PrimaryKeyAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type PrimaryKeyAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
type PrimaryKeyAttribute = class
inherit Attribute
Public NotInheritable Class PrimaryKeyAttribute
Inherits Attribute
- 상속
-
PrimaryKeyAttribute
- 특성
설명
이 특성은 단일 속성으로 구성된 키와 여러 속성으로 구성된 복합 키에 모두 사용할 수 있습니다. KeyAttribute 는 단일 속성 키에 대신 사용할 수 있습니다. 이 경우 동작은 동일합니다. 두 특성을 모두 사용하는 경우 이 특성이 우선합니다.
자세한 내용 및 예제는 모델링 엔터티 형식 및 관계를 참조하세요.
생성자
| 속성 | Description |
|---|---|
| PrimaryKeyAttribute(String, String[]) |
PrimaryKeyAttribute 클래스의 새 인스턴스를 초기화합니다. |
속성
| 속성 | Description |
|---|---|
| PropertyNames |
기본 키를 구성하는 속성(순서대로)입니다. |