Language

DbContextModelAttribute クラス

定義

特定のコンテキストに使用する必要がある RuntimeModel 実装を識別します。

[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class DbContextModelAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DbContextModelAttribute = class
    inherit Attribute
Public NotInheritable Class DbContextModelAttribute
Inherits Attribute
継承
DbContextModelAttribute
属性

注釈

通常、この属性はコンパイル済みモデルで生成されるため、コードで指定する必要はありません。

詳細と例については、 DbContext プールの使用 を参照してください。

コンストラクター

Name 説明
DbContextModelAttribute(Type, Type)

DbContextAttribute クラスの新しいインスタンスを初期化します。

プロパティ

Name 説明
ContextType

関連付けられているコンテキストを取得します。

ModelType

コンパイル済みモデルを取得します。

ProviderName

コンパイル済みモデルのビルドに使用されるデータベース プロバイダー名を取得します。

適用対象