Class DbContextHandle<TContext>
Represents a DbContext test double created by FastMoq.
Inherited Members
Namespace: FastMoq
Assembly: FastMoq.Database.dll
Syntax
public sealed class DbContextHandle<TContext> where TContext : DbContext
Type Parameters
| Name | Description |
|---|---|
| TContext |
Properties
Context
Gets the resolved DbContext instance.
Declaration
public TContext Context { get; }
Property Value
| Type | Description |
|---|---|
| TContext |
IsMocked
Gets a value indicating whether this handle is backed by a DbContext mock.
Declaration
public bool IsMocked { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Mock
Gets the DbContext mock when the handle is in mocked-set mode.
Declaration
public DbContextMock<TContext>? Mock { get; }
Property Value
| Type | Description |
|---|---|
| DbContextMock<TContext> |
Mode
Gets the provisioning mode used for this handle.
Declaration
public DbContextTestMode Mode { get; }
Property Value
| Type | Description |
|---|---|
| DbContextTestMode |