Soenneker.DataTables.Extensions.ServerSideRequest
4.0.197
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.DataTables.Extensions.ServerSideRequest --version 4.0.197
NuGet\Install-Package Soenneker.DataTables.Extensions.ServerSideRequest -Version 4.0.197
<PackageReference Include="Soenneker.DataTables.Extensions.ServerSideRequest" Version="4.0.197" />
<PackageVersion Include="Soenneker.DataTables.Extensions.ServerSideRequest" Version="4.0.197" />
<PackageReference Include="Soenneker.DataTables.Extensions.ServerSideRequest" />
paket add Soenneker.DataTables.Extensions.ServerSideRequest --version 4.0.197
#r "nuget: Soenneker.DataTables.Extensions.ServerSideRequest, 4.0.197"
#:package Soenneker.DataTables.Extensions.ServerSideRequest@4.0.197
#addin nuget:?package=Soenneker.DataTables.Extensions.ServerSideRequest&version=4.0.197
#tool nuget:?package=Soenneker.DataTables.Extensions.ServerSideRequest&version=4.0.197
Soenneker.DataTables.Extensions.ServerSideRequest
Converts a DataTables server-side request into RequestDataOptions while mapping client column names to an explicit server-owned search and ordering allow-list.
Installation
dotnet add package Soenneker.DataTables.Extensions.ServerSideRequest
Define the queryable model
using System.Text.Json.Serialization;
using Soenneker.Attributes.MapTo;
using Soenneker.DataTables.Attributes.Orderable;
using Soenneker.DataTables.Attributes.Searchable;
public sealed class CustomerRow
{
[JsonPropertyName("name")]
[MapTo("contact.name")]
[DataTableSearchable]
[DataTableOrderable]
public required string Name { get; init; }
[JsonPropertyName("createdAt")]
[MapTo("createdAt")]
[DataTableOrderable]
public DateTimeOffset CreatedAt { get; init; }
public string? InternalNote { get; init; }
}
JsonPropertyName is the external name sent by DataTables. MapTo optionally identifies the field understood by the downstream data API. Without MapTo, the external name is used.
Only properties marked with DataTableSearchable can become search fields or exact-match column filters. Only properties marked with DataTableOrderable can become order clauses. Client flags alone do not grant access.
Convert the request
using Soenneker.DataTables.Extensions.ServerSideRequest;
using Soenneker.Dtos.RequestDataOptions;
RequestDataOptions options = request.ToRequestDataOptions<CustomerRow>();
The conversion:
- uses a default page size of 50 when
Lengthis zero or negative; - caps the page size at 250;
- trims empty global and column search values to
null; - ignores unknown columns, invalid column indices, and sort directions other than
ascordesc; - ignores properties marked with
JsonIgnoreand rejects duplicate external names rather than choosing one arbitrarily; - carries the continuation token through unchanged.
The result is still query input. The downstream repository should validate mapped paths it supports, enforce its own cost limits, and treat the continuation token and search text as untrusted. The DataTables regex flags are not translated into regex queries.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Soenneker.Attributes.MapTo (>= 4.0.23)
- Soenneker.DataTables.Attributes.Orderable (>= 4.0.21)
- Soenneker.DataTables.Attributes.Searchable (>= 4.0.21)
- Soenneker.DataTables.Dtos.ServerSideRequest (>= 4.0.25)
- Soenneker.Dtos.RequestDataOptions (>= 4.0.186)
- Soenneker.Extensions.String (>= 4.0.723)
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.205 | 0 | 8/31/2026 |
| 4.0.204 | 0 | 8/31/2026 |
| 4.0.203 | 0 | 8/31/2026 |
| 4.0.202 | 34 | 8/31/2026 |
| 4.0.201 | 45 | 8/30/2026 |
| 4.0.200 | 43 | 8/30/2026 |
| 4.0.199 | 34 | 8/30/2026 |
| 4.0.198 | 37 | 8/30/2026 |
| 4.0.197 | 34 | 8/30/2026 |
| 4.0.196 | 43 | 8/29/2026 |
| 4.0.195 | 37 | 8/29/2026 |
| 4.0.194 | 227 | 8/26/2026 |
| 4.0.193 | 71 | 8/26/2026 |
| 4.0.192 | 71 | 8/25/2026 |
| 4.0.191 | 163 | 8/21/2026 |
| 4.0.190 | 115 | 8/21/2026 |
| 4.0.189 | 228 | 8/18/2026 |
| 4.0.188 | 96 | 8/18/2026 |
| 4.0.187 | 97 | 8/18/2026 |
| 4.0.186 | 93 | 8/18/2026 |
Harden DataTables request conversion