FlexQuery.NET.AspNetCore
4.0.0-rc.1
See the version list below for details.
dotnet add package FlexQuery.NET.AspNetCore --version 4.0.0-rc.1
NuGet\Install-Package FlexQuery.NET.AspNetCore -Version 4.0.0-rc.1
<PackageReference Include="FlexQuery.NET.AspNetCore" Version="4.0.0-rc.1" />
<PackageVersion Include="FlexQuery.NET.AspNetCore" Version="4.0.0-rc.1" />
<PackageReference Include="FlexQuery.NET.AspNetCore" />
paket add FlexQuery.NET.AspNetCore --version 4.0.0-rc.1
#r "nuget: FlexQuery.NET.AspNetCore, 4.0.0-rc.1"
#:package FlexQuery.NET.AspNetCore@4.0.0-rc.1
#addin nuget:?package=FlexQuery.NET.AspNetCore&version=4.0.0-rc.1&prerelease
#tool nuget:?package=FlexQuery.NET.AspNetCore&version=4.0.0-rc.1&prerelease
FlexQuery.NET.AspNetCore
ASP.NET Core integration with declarative field-access security.
When to Use This Package
Install this package when you want to use [FieldAccess] attributes on your API controllers to declare per-endpoint security rules, and to shape QueryResult<T> JSON serialization so an explicit select exposes only the selected fields.
Installation
dotnet add package FlexQuery.NET.AspNetCore
Registration
// Global FlexQuery configuration (defaults, entity → DTO maps)
builder.Services.AddFlexQuery(options =>
{
options.MaxPageSize = 100;
options.StrictFieldValidation = true;
});
// [FieldAccess] attributes + result-shape JSON converter
builder.Services.AddControllers()
.AddFlexQuerySecurity();
Use AddFlexQueryJson() instead of AddFlexQuerySecurity() if you only want the result-shape JSON converter without the security filter.
Quick Start
using FlexQuery.NET.AspNetCore.Attributes;
[ApiController]
[Route("api/[controller]")]
public class UsersController : ControllerBase
{
[HttpGet]
[FieldAccess(Allowed = new[] { "Id", "Name", "Email", "Status" },
MaxDepth = 2)]
public async Task<IActionResult> GetUsers(
[FromQuery] FlexQueryParameters parameters,
CancellationToken cancellationToken)
{
var result = await _context.Users
.FlexQueryAsync(parameters, cancellationToken: cancellationToken);
return Ok(result);
}
}
The FieldAccessFilter action filter applies the attribute's settings to the request's execution options automatically. The effective options can be retrieved inside the action when needed:
var options = HttpContext.GetFlexQueryExecutionOptions();
Features
[FieldAccess]Attribute — Declare Allowed, Blocked, Filterable, Sortable, Selectable, Groupable, Aggregatable fields, AllowedIncludes, DefaultSortField/Direction, and MaxDepth per controller or actionFieldAccessFilter— Action filter that applies attribute settings and stores them inHttpContext.Items- Result-Shape JSON — With an explicit
select, the response contains exactly the selected output fields (under their aliases) - Automatic Security Resolution —
GetFlexQueryExecutionOptions()extension for reading the effective per-request options
Related Packages
- FlexQuery.NET — Core query engine
- FlexQuery.NET.EntityFrameworkCore — EF Core execution
- FlexQuery.NET.Dapper — Dapper execution
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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
- FlexQuery.NET (>= 4.0.0-rc.1)
-
net6.0
- FlexQuery.NET (>= 4.0.0-rc.1)
-
net8.0
- FlexQuery.NET (>= 4.0.0-rc.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0 | 117 | 9/23/2026 |
| 4.0.0-rc.3 | 42 | 9/22/2026 |
| 4.0.0-rc.2 | 62 | 9/17/2026 |
| 4.0.0-rc.1 | 62 | 9/10/2026 |
| 4.0.0-preview.3 | 67 | 7/18/2026 |
| 4.0.0-preview.2 | 67 | 7/14/2026 |
| 4.0.0-preview.1 | 70 | 7/12/2026 |
| 4.0.0-beta1.0 | 74 | 9/8/2026 |
| 3.1.1 | 1,111 | 7/4/2026 |
| 3.1.0 | 129 | 6/26/2026 |
| 3.0.6 | 121 | 6/24/2026 |
| 3.0.5 | 123 | 6/24/2026 |
| 3.0.4 | 120 | 6/23/2026 |
| 3.0.3 | 123 | 6/23/2026 |
| 3.0.2 | 124 | 6/22/2026 |
| 3.0.1 | 127 | 6/22/2026 |
| 2.5.0 | 121 | 5/13/2026 |
| 2.4.0 | 121 | 5/10/2026 |
| 2.3.1 | 123 | 5/8/2026 |
- docs(readme): update root and package READMEs for v4 APIs
- merge Feature/docs site v4 (#13)
- docs(site): refine docs navigation and readability behaviors
- docs(site): redesign the landing page around the query pipeline
- docs: add v4 documentation site (Next.js + Fumadocs)