QueryGuard.EntityFrameworkCore
0.1.0
Prefix Reserved
dotnet add package QueryGuard.EntityFrameworkCore --version 0.1.0
NuGet\Install-Package QueryGuard.EntityFrameworkCore -Version 0.1.0
<PackageReference Include="QueryGuard.EntityFrameworkCore" Version="0.1.0" />
<PackageVersion Include="QueryGuard.EntityFrameworkCore" Version="0.1.0" />
<PackageReference Include="QueryGuard.EntityFrameworkCore" />
paket add QueryGuard.EntityFrameworkCore --version 0.1.0
#r "nuget: QueryGuard.EntityFrameworkCore, 0.1.0"
#:package QueryGuard.EntityFrameworkCore@0.1.0
#addin nuget:?package=QueryGuard.EntityFrameworkCore&version=0.1.0
#tool nuget:?package=QueryGuard.EntityFrameworkCore&version=0.1.0
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. Use 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 | Versions 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. |
-
net10.0
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- QueryGuard.Core (>= 0.1.0)
-
net8.0
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.1)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
- QueryGuard.Core (>= 0.1.0)
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 |