DbContextAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
クラスが属する 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 を使用したデータベース スキーマの管理 」を参照してください。
コンストラクター
| Name | 説明 |
|---|---|
| DbContextAttribute(Type) |
DbContextAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
| Name | 説明 |
|---|---|
| ContextType |
関連付けられているコンテキストを取得します。 |