Skip to main content
MockQueryable.NSubstitute package icon

MockQueryable.NSubstitute

Extension for mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc. When writing tests for your application it is often desirable to avoid hitting the database. The extension allows you to achieve this by creating a context – with behavior defined by your tests – that makes use of in-memory data.

Total Downloads
7.4M
7,367,281
Published
Jul 27, 2025
Latest stable version

Install

.NET CLI
dotnet add package MockQueryable.NSubstitute --version 8.0.0
Package Manager Console
Install-Package MockQueryable.NSubstitute -Version 8.0.0
PackageReference
<PackageReference Include="MockQueryable.NSubstitute" Version="8.0.0" />

Frameworks

net8.0

Dependencies

[5.3.0, )

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.