IDbContextFactory<TContext> Interface
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.
Defines a factory for creating DbContext instances.
C#
public interface IDbContextFactory<out TContext> where TContext : DbContext
C#
public interface IDbContextFactory<TContext> where TContext : DbContext
type IDbContextFactory<'Context (requires 'Context :> DbContext)> = interface
Public Interface IDbContextFactory(Of Out TContext)
Public Interface IDbContextFactory(Of TContext)
- TContext
The DbContext type to create.
This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.- Derived
See Using DbContextFactory for more information and examples.
Create |
Creates a new DbContext instance. |
Create |
Creates a new DbContext instance in an async context. |
Toode | Versioonid |
---|---|
Entity Framework Core | 5.0, 6.0, 7.0, 8.0, 9.0 |
Tehke meiega GitHubis koostööd
Selle sisu allika leiate GitHubist, kus saate ka probleeme luua ja läbi vaadata ning päringuid teha. Lisateavet leiate meie kaasautorite juhendist.
Toote „Entity Framework“ tagasiside
Entity Framework on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: