FastMoq
Search Results for

    Show / Hide Table of Contents

    Class DbContextHandle<TContext>

    Represents a DbContext test double created by FastMoq.

    Inheritance
    object
    DbContextHandle<TContext>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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

    Extension Methods

    ObjectExtensions.RaiseIfNull<T>(T?, string?, string?, int?, string?)
    TestClassExtensions.GetFieldValue<TObject>(TObject, string, TObject?)
    TestClassExtensions.GetField<TObject>(TObject, string)
    TestClassExtensions.GetMemberName<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMember<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMethodValue<TObject>(TObject, string, object?, params object[])
    TestClassExtensions.GetMethod<TObject>(TObject, string)
    TestClassExtensions.GetPropertyValue<TObject>(TObject, string, object?)
    TestClassExtensions.GetProperty<TObject>(TObject, string)
    TestClassExtensions.SetFieldValue<TObject>(TObject, string, object?)
    TestClassExtensions.SetPropertyValue<TObject>(TObject, string, object?)
    MockerHttpMoqExtensions.SetupHttpMessage(object, Func<HttpResponseMessage>, Expression?, Expression?)
    MockerHttpMoqExtensions.SetupMessageAsync<TMock, TReturn>(object, Expression<Func<TMock, Task<TReturn>>>, Func<TReturn>)
    MockerHttpMoqExtensions.SetupMessageProtectedAsync<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessageProtected<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessage<TMock, TReturn>(object, Expression<Func<TMock, TReturn>>, Func<TReturn>)
    TestClassExtensions.GetFieldInfo<TType>(object, string)
    TestClassExtensions.GetFieldValue<T>(object?, FieldInfo)
    TestClassExtensions.GetFieldValue<T, TType>(object, string)
    In this article
    Back to top
    Generated 2026-04-08 00:16 UTC