DbContextActivator.CreateInstance Method
Definition
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.
Overloads
CreateInstance(Type, Assembly, IOperationReportHandler) |
Creates an instance of the specified DbContext type using the standard design-time mechanisms. When available, this will use any IDesignTimeDbContextFactory<TContext> implementations or the application's service provider. |
CreateInstance(Type, Assembly, IOperationReportHandler, String[]) |
Creates an instance of the specified DbContext type using the standard design-time mechanisms. When available, this will use any IDesignTimeDbContextFactory<TContext> implementations or the application's service provider. |
CreateInstance(Type, Assembly, IOperationReportHandler)
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
Creates an instance of the specified DbContext type using the standard design-time mechanisms. When available, this will use any IDesignTimeDbContextFactory<TContext> implementations or the application's service provider.
public static Microsoft.EntityFrameworkCore.DbContext CreateInstance (Type contextType, System.Reflection.Assembly startupAssembly = default, Microsoft.EntityFrameworkCore.Design.IOperationReportHandler reportHandler = default);
public static Microsoft.EntityFrameworkCore.DbContext CreateInstance (Type contextType, System.Reflection.Assembly? startupAssembly = default, Microsoft.EntityFrameworkCore.Design.IOperationReportHandler? reportHandler = default);
static member CreateInstance : Type * System.Reflection.Assembly * Microsoft.EntityFrameworkCore.Design.IOperationReportHandler -> Microsoft.EntityFrameworkCore.DbContext
Public Shared Function CreateInstance (contextType As Type, Optional startupAssembly As Assembly = Nothing, Optional reportHandler As IOperationReportHandler = Nothing) As DbContext
Parameters
- startupAssembly
- Assembly
The application's startup assembly.
- reportHandler
- IOperationReportHandler
The design-time report handler.
Returns
The newly created object.
Applies to
CreateInstance(Type, Assembly, IOperationReportHandler, String[])
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
- Source:
- DbContextActivator.cs
Creates an instance of the specified DbContext type using the standard design-time mechanisms. When available, this will use any IDesignTimeDbContextFactory<TContext> implementations or the application's service provider.
public static Microsoft.EntityFrameworkCore.DbContext CreateInstance (Type contextType, System.Reflection.Assembly startupAssembly, Microsoft.EntityFrameworkCore.Design.IOperationReportHandler reportHandler, string[] args);
public static Microsoft.EntityFrameworkCore.DbContext CreateInstance (Type contextType, System.Reflection.Assembly? startupAssembly, Microsoft.EntityFrameworkCore.Design.IOperationReportHandler? reportHandler, string[]? args);
static member CreateInstance : Type * System.Reflection.Assembly * Microsoft.EntityFrameworkCore.Design.IOperationReportHandler * string[] -> Microsoft.EntityFrameworkCore.DbContext
Public Shared Function CreateInstance (contextType As Type, startupAssembly As Assembly, reportHandler As IOperationReportHandler, args As String()) As DbContext
Parameters
- startupAssembly
- Assembly
The application's startup assembly.
- reportHandler
- IOperationReportHandler
The design-time report handler.
- args
- String[]
Arguments passed to the application.
Returns
The newly created object.
Applies to
Entity Framework