Sprache

DbContext Konstruktoren

Definition

Überlädt

Name Beschreibung
DbContext()

Initialisiert eine neue Instanz der DbContext-Klasse. Die OnConfiguring(DbContextOptionsBuilder) Methode wird aufgerufen, um die Für diesen Kontext zu verwendende Datenbank (und andere Optionen) zu konfigurieren.

DbContext(DbContextOptions)

Initialisiert eine neue Instanz der Klasse mithilfe der DbContext angegebenen Optionen. Die OnConfiguring(DbContextOptionsBuilder) Methode wird weiterhin aufgerufen, um eine weitere Konfiguration der Optionen zu ermöglichen.

DbContext()

Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs

Initialisiert eine neue Instanz der DbContext-Klasse. Die OnConfiguring(DbContextOptionsBuilder) Methode wird aufgerufen, um die Für diesen Kontext zu verwendende Datenbank (und andere Optionen) zu konfigurieren.

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 ()
Attribute

Hinweise

Weitere Informationen und Beispiele finden Sie unter DbContext-Lebensdauer, Konfiguration und Initialisierung .

Gilt für:

DbContext(DbContextOptions)

Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs
Quelle:
DbContext.cs

Initialisiert eine neue Instanz der Klasse mithilfe der DbContext angegebenen Optionen. Die OnConfiguring(DbContextOptionsBuilder) Methode wird weiterhin aufgerufen, um eine weitere Konfiguration der Optionen zu ermöglichen.

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)

Parameter

options
DbContextOptions

Die Optionen für diesen Kontext.

Attribute

Hinweise

Weitere Informationen und Beispiele finden Sie unter "DbContext Lifetime", "Configuration" und "Initialization " und "Using DbContextOptions ".

Gilt für: