QueryGuard.EntityFrameworkCore 0.1.0-preview.5

Prefix Reserved
This is a prerelease version of QueryGuard.EntityFrameworkCore.
There is a newer version of this package available.
See the version list below for details.
dotnet add package QueryGuard.EntityFrameworkCore --version 0.1.0-preview.5
                    
NuGet\Install-Package QueryGuard.EntityFrameworkCore -Version 0.1.0-preview.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="QueryGuard.EntityFrameworkCore" Version="0.1.0-preview.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="QueryGuard.EntityFrameworkCore" Version="0.1.0-preview.5" />
                    
Directory.Packages.props
<PackageReference Include="QueryGuard.EntityFrameworkCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add QueryGuard.EntityFrameworkCore --version 0.1.0-preview.5
                    
#r "nuget: QueryGuard.EntityFrameworkCore, 0.1.0-preview.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package QueryGuard.EntityFrameworkCore@0.1.0-preview.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=QueryGuard.EntityFrameworkCore&version=0.1.0-preview.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=QueryGuard.EntityFrameworkCore&version=0.1.0-preview.5&prerelease
                    
Install as a Cake Tool

QueryGuard.EntityFrameworkCore

Captures Entity Framework Core relational commands for QueryGuard.NET, so repeated SQL can be grouped and query budgets can be enforced.

Capture uses the official EF Core interception API. QueryGuard observes only: it never modifies the generated SQL, suppresses a command, changes a result, or replaces the exception your application sees.

Registering the interceptor

builder.Services.AddDbContext<AppDbContext>((services, db) =>
{
    db.UseSqlite(connectionString);
    db.AddInterceptors(services.GetRequiredService<QueryGuardCommandInterceptor>());
});

In a test, or anywhere without a dependency injection container, one line does the same thing and cannot be wired to the wrong accessor:

options.UseSqlite(connectionString).UseQueryGuard();

Nothing is captured unless a QueryGuard scope is open — through QueryGuard.AspNetCore middleware for a request, or QueryGuard.Testing for a test. With no active scope the interceptor does no work at all.

Privacy defaults

Parameter values and connection strings are never captured, literals in SQL are redacted, and retained samples are bounded. See SECURITY.md.

Supported versions

Target framework EF Core
net8.0 8.0.x
net10.0 10.0.x

Any relational EF Core provider works through the interception contract, so commands will be captured and grouped. Whether your provider's SQL formatting produces equally good fingerprint grouping is a separate claim: SQLite and PostgreSQL are integration-tested in CI, SQL Server is verified against captured SQL fixtures, and everything else is unverified. The provider matrix keeps those tiers apart rather than blurring them.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on QueryGuard.EntityFrameworkCore:

Package Downloads
QueryGuard.Testing

Open an explicit QueryGuard scope in an integration test and assert that a query budget held. Takes no dependency on any test framework, so it works with xUnit, NUnit, MSTest, or TUnit unchanged.

QueryGuard.AspNetCore

Opens a QueryGuard session around each ASP.NET Core request and evaluates per-endpoint query policies. Observes only: the response, its headers, and the original exception are never modified.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 55 8/21/2026
0.1.0-preview.6 56 8/21/2026
0.1.0-preview.5 59 8/21/2026
0.1.0-preview.4 57 8/20/2026
0.1.0-preview.3 54 8/20/2026
0.1.0-preview.2 53 8/20/2026
0.1.0-preview.1 44 8/20/2026