언어

DbContextAttribute 클래스

정의

클래스가 DbContext 속한 것을 식별합니다. 예를 들어 이 특성은 마이그레이션이 적용되는 컨텍스트를 식별하는 데 사용됩니다. 디자인 타임 도구에 대한 어셈블리에 사용되는 컨텍스트를 나타내는 데도 사용됩니다.

[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class DbContextAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class DbContextAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class DbContextAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
type DbContextAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DbContextAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DbContextAttribute = class
    inherit Attribute
Public NotInheritable Class DbContextAttribute
Inherits Attribute
상속
DbContextAttribute
특성

설명

자세한 내용 및 예제는 EF Core를 사용하여 데이터베이스 스키마 관리를 참조하세요.

생성자

속성 Description
DbContextAttribute(Type)

DbContextAttribute 클래스의 새 인스턴스를 초기화합니다.

속성

속성 Description
ContextType

연결된 컨텍스트를 가져옵니다.

적용 대상