Dil

DbContext Oluşturucular

Tanım

Aşırı Yüklemeler

Veri Akışı Adı Description
DbContext()

DbContext sınıfının yeni bir örneğini başlatır. Bu OnConfiguring(DbContextOptionsBuilder) bağlam için kullanılacak veritabanını (ve diğer seçenekleri) yapılandırmak için yöntemi çağrılır.

DbContext(DbContextOptions)

Belirtilen seçenekleri kullanarak sınıfın DbContext yeni bir örneğini başlatır. Yöntemi OnConfiguring(DbContextOptionsBuilder) , seçeneklerin daha fazla yapılandırılmasına izin vermek için çağrılmaya devam eder.

DbContext()

Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs

DbContext sınıfının yeni bir örneğini başlatır. Bu OnConfiguring(DbContextOptionsBuilder) bağlam için kullanılacak veritabanını (ve diğer seçenekleri) yapılandırmak için yöntemi çağrılır.

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 ()
Özellikler

Açıklamalar

Daha fazla bilgi ve örnek için bkz. DbContext yaşam süresi, yapılandırma ve başlatma .

Şunlara uygulanır

DbContext(DbContextOptions)

Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs
Kaynak:
DbContext.cs

Belirtilen seçenekleri kullanarak sınıfın DbContext yeni bir örneğini başlatır. Yöntemi OnConfiguring(DbContextOptionsBuilder) , seçeneklerin daha fazla yapılandırılmasına izin vermek için çağrılmaya devam eder.

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)

Parametreler

options
DbContextOptions

Bu bağlamın seçenekleri.

Özellikler

Açıklamalar

Daha fazla bilgi ve örnek için bkz. DbContext yaşam süresi, yapılandırma ve başlatma ve DbContextOptions kullanma .

Şunlara uygulanır