Mocker..::..GetDbContext<(Of <(<'TContext>)>)> Method (DbContextOptions<(Of <(<'TContext>)>)>, DbConnection)

Gets the database context.

Namespace:  FastMoq
Assembly:  FastMoq.Core (in FastMoq.Core.dll)

Syntax


public TContext GetDbContext<TContext>(
	DbContextOptions<TContext> options,
	DbConnection connection
)
where TContext : DbContext
Public Function GetDbContext(Of TContext As DbContext) ( _
	options As DbContextOptions(Of TContext), _
	connection As DbConnection _
) As TContext
public:
generic<typename TContext>
where TContext : DbContext
TContext GetDbContext(
	DbContextOptions<TContext>^ options, 
	DbConnection^ connection
)

Type Parameters

TContext
The type of the t context.

Parameters

options
Type: DbContextOptions<(Of <(<'TContext>)>)>
The options.
connection
Type: DbConnection
The connection.

Return Value

TContext.