Language

DbContext コンストラクター

定義

オーバーロード

Name 説明
DbContext()

DbContext クラスの新しいインスタンスを初期化します。 このコンテキストに使用するデータベース (およびその他のオプション) を構成するために、 OnConfiguring(DbContextOptionsBuilder) メソッドが呼び出されます。

DbContext(DbContextOptions)

指定したオプションを使用して、 DbContext クラスの新しいインスタンスを初期化します。 オプションをさらに構成できるように、 OnConfiguring(DbContextOptionsBuilder) メソッドは引き続き呼び出されます。

DbContext()

ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs

DbContext クラスの新しいインスタンスを初期化します。 このコンテキストに使用するデータベース (およびその他のオプション) を構成するために、 OnConfiguring(DbContextOptionsBuilder) メソッドが呼び出されます。

protected DbContext();
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("EF Core isn't fully compatible with NativeAOT, and running the application may generate unexpected runtime failures.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EF Core isn't fully compatible with trimming, and running the application may generate unexpected runtime failures. Some specific coding pattern are usually required to make trimming work properly, see https://aka.ms/efcore-docs-trimming for more details.")]
protected DbContext();
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EF Core isn't fully compatible with trimming, and running the application may generate unexpected runtime failures. Some specific coding pattern are usually required to make trimming work properly, see https://aka.ms/efcore-docs-trimming for more details.")]
protected DbContext();
Protected Sub New ()
属性

注釈

詳細と例については 、DbContext の有効期間、構成、および初期化 に関する説明を参照してください。

適用対象

DbContext(DbContextOptions)

ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs
ソース:
DbContext.cs

指定したオプションを使用して、 DbContext クラスの新しいインスタンスを初期化します。 オプションをさらに構成できるように、 OnConfiguring(DbContextOptionsBuilder) メソッドは引き続き呼び出されます。

public DbContext(Microsoft.EntityFrameworkCore.DbContextOptions options);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("EF Core isn't fully compatible with NativeAOT, and running the application may generate unexpected runtime failures.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EF Core isn't fully compatible with trimming, and running the application may generate unexpected runtime failures. Some specific coding pattern are usually required to make trimming work properly, see https://aka.ms/efcore-docs-trimming for more details.")]
public DbContext(Microsoft.EntityFrameworkCore.DbContextOptions options);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EF Core isn't fully compatible with trimming, and running the application may generate unexpected runtime failures. Some specific coding pattern are usually required to make trimming work properly, see https://aka.ms/efcore-docs-trimming for more details.")]
public DbContext(Microsoft.EntityFrameworkCore.DbContextOptions options);
new Microsoft.EntityFrameworkCore.DbContext : Microsoft.EntityFrameworkCore.DbContextOptions -> Microsoft.EntityFrameworkCore.DbContext
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("EF Core isn't fully compatible with NativeAOT, and running the application may generate unexpected runtime failures.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EF Core isn't fully compatible with trimming, and running the application may generate unexpected runtime failures. Some specific coding pattern are usually required to make trimming work properly, see https://aka.ms/efcore-docs-trimming for more details.")>]
new Microsoft.EntityFrameworkCore.DbContext : Microsoft.EntityFrameworkCore.DbContextOptions -> Microsoft.EntityFrameworkCore.DbContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EF Core isn't fully compatible with trimming, and running the application may generate unexpected runtime failures. Some specific coding pattern are usually required to make trimming work properly, see https://aka.ms/efcore-docs-trimming for more details.")>]
new Microsoft.EntityFrameworkCore.DbContext : Microsoft.EntityFrameworkCore.DbContextOptions -> Microsoft.EntityFrameworkCore.DbContext
Public Sub New (options As DbContextOptions)

パラメーター

options
DbContextOptions

このコンテキストのオプション。

属性

注釈

詳細と例については、「 DbContext の有効期間、構成、初期化 」および 「DbContextOptions の使用 」を参照してください。

適用対象