Share via


PooledDbContextFactory<TContext> Constructors

Definition

Overloads

PooledDbContextFactory<TContext>(IDbContextPool<TContext>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

PooledDbContextFactory<TContext>(DbContextOptions<TContext>, Int32)

Initializes a new instance of the PooledDbContextFactory<TContext> class.

PooledDbContextFactory<TContext>(IDbContextPool<TContext>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public PooledDbContextFactory (Microsoft.EntityFrameworkCore.Internal.IDbContextPool<TContext> pool);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
new Microsoft.EntityFrameworkCore.Infrastructure.PooledDbContextFactory<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> : Microsoft.EntityFrameworkCore.Internal.IDbContextPool<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> -> Microsoft.EntityFrameworkCore.Infrastructure.PooledDbContextFactory<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)>
Public Sub New (pool As IDbContextPool(Of TContext))

Parameters

pool
Microsoft.EntityFrameworkCore.Internal.IDbContextPool<TContext>
Attributes

Applies to

PooledDbContextFactory<TContext>(DbContextOptions<TContext>, Int32)

Initializes a new instance of the PooledDbContextFactory<TContext> class.

public PooledDbContextFactory (Microsoft.EntityFrameworkCore.DbContextOptions<TContext> options, int poolSize = 1024);
new Microsoft.EntityFrameworkCore.Infrastructure.PooledDbContextFactory<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> : Microsoft.EntityFrameworkCore.DbContextOptions<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> * int -> Microsoft.EntityFrameworkCore.Infrastructure.PooledDbContextFactory<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)>
Public Sub New (options As DbContextOptions(Of TContext), Optional poolSize As Integer = 1024)

Parameters

options
DbContextOptions<TContext>

The options to use for contexts produced by this factory.

poolSize
Int32

Sets the maximum number of instances retained by the pool. Defaults to 1024.

Applies to