DbContextOptionsBuilder<TContext> Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
DbContextOptionsBuilder<TContext>() |
Initializes a new instance of the DbContextOptionsBuilder<TContext> class with no options set. |
DbContextOptionsBuilder<TContext>(DbContextOptions<TContext>) |
Initializes a new instance of the DbContextOptionsBuilder<TContext> class to further configure a given DbContextOptions. |
Initializes a new instance of the DbContextOptionsBuilder<TContext> class with no options set.
public DbContextOptionsBuilder ();
Public Sub New ()
Applies to
Entity Framework Core 9.0 and other versions
Product | Versions |
---|---|
Entity Framework Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
Initializes a new instance of the DbContextOptionsBuilder<TContext> class to further configure a given DbContextOptions.
public DbContextOptionsBuilder (Microsoft.EntityFrameworkCore.DbContextOptions<TContext> options);
new Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> : Microsoft.EntityFrameworkCore.DbContextOptions<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)>
Public Sub New (options As DbContextOptions(Of TContext))
Parameters
- options
- DbContextOptions<TContext>
The options to be configured.
Applies to
Entity Framework Core 9.0 and other versions
Product | Versions |
---|---|
Entity Framework Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
Entity Framework feedback
Entity Framework is an open source project. Select a link to provide feedback: