Soenneker.DataTables.Dtos.ServerSideRequest
4.0.27
Prefix Reserved
dotnet add package Soenneker.DataTables.Dtos.ServerSideRequest --version 4.0.27
NuGet\Install-Package Soenneker.DataTables.Dtos.ServerSideRequest -Version 4.0.27
<PackageReference Include="Soenneker.DataTables.Dtos.ServerSideRequest" Version="4.0.27" />
<PackageVersion Include="Soenneker.DataTables.Dtos.ServerSideRequest" Version="4.0.27" />
<PackageReference Include="Soenneker.DataTables.Dtos.ServerSideRequest" />
paket add Soenneker.DataTables.Dtos.ServerSideRequest --version 4.0.27
#r "nuget: Soenneker.DataTables.Dtos.ServerSideRequest, 4.0.27"
#:package Soenneker.DataTables.Dtos.ServerSideRequest@4.0.27
#addin nuget:?package=Soenneker.DataTables.Dtos.ServerSideRequest&version=4.0.27
#tool nuget:?package=Soenneker.DataTables.Dtos.ServerSideRequest&version=4.0.27
Soenneker.DataTables.Dtos.ServerSideRequest
Typed request models for DataTables server-side paging, search, and ordering.
Installation
dotnet add package Soenneker.DataTables.Dtos.ServerSideRequest
Bind a JSON request in ASP.NET Core
using Microsoft.AspNetCore.Mvc;
using Soenneker.DataTables.Dtos.ServerSideRequest;
[HttpPost("customers/table")]
public IActionResult GetCustomers([FromBody] DataTableServerSideRequest request)
{
int start = Math.Max(request.Start, 0);
int length = Math.Clamp(request.Length, 1, 250);
// Apply validated search/order fields, fetch the page, and return a
// DataTables server response using request.Draw.
return Ok();
}
A typical JSON body is:
{
"draw": 3,
"start": 0,
"length": 25,
"search": { "value": "ada", "regex": false },
"order": [{ "column": 1, "dir": "asc" }],
"columns": [
{ "data": "id", "name": "id", "searchable": false, "orderable": false, "search": { "value": "", "regex": false } },
{ "data": "name", "name": "name", "searchable": true, "orderable": true, "search": { "value": "", "regex": false } }
]
}
DataTables commonly submits bracketed form/query keys such as columns[0][data] by default. Configure the client to send JSON when using [FromBody], or add an appropriate model binder for the default payload format.
Validate before querying
- Clamp
Lengthto an application-defined maximum and reject unsupported negative values such as DataTables'-1“all rows” request. - Verify every
Order[i].Columnindex before indexingColumns. - Map
Columns[i].DataorNameto a known server-side property; never splice the client value into SQL or another query language. - Accept only
ascordescforDir. - Do not enable regular-expression search merely because
Regexistrue; regex evaluation can be expensive and unsafe without timeouts and limits. - Treat
ContinuationTokenas opaque, untrusted input. DataTables does not manage this package-specific extension automatically.
Search, Order, and Columns are nullable because incomplete or custom clients may omit them. Handle that explicitly before applying a query.
| 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
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Soenneker.DataTables.Dtos.ServerSideRequest:
| Package | Downloads |
|---|---|
|
Soenneker.Blazor.DataTables
A Blazor interop library for DataTables |
|
|
Soenneker.Quark.Suite
Shadcn-powered Blazor UI, refined and modular. |
|
|
Soenneker.DataTables.Extensions.ServerSideRequest
A collection of helpful DataTableServerSideRequest extension methods |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.27 | 38 | 8/30/2026 |
| 4.0.25 | 10,518 | 7/28/2026 |
| 4.0.24 | 4,417 | 7/21/2026 |
| 4.0.23 | 3,518 | 7/16/2026 |
| 4.0.22 | 9,602 | 6/18/2026 |
| 4.0.21 | 6,867 | 6/5/2026 |
| 4.0.20 | 127 | 6/5/2026 |
| 4.0.19 | 11,123 | 4/22/2026 |
| 4.0.18 | 10,644 | 3/12/2026 |
| 4.0.17 | 132 | 3/12/2026 |
| 4.0.16 | 116 | 3/12/2026 |
| 4.0.15 | 240 | 3/12/2026 |
| 4.0.14 | 1,203 | 3/10/2026 |
| 4.0.13 | 945 | 3/9/2026 |
| 4.0.12 | 126 | 3/9/2026 |
| 4.0.11 | 169 | 3/9/2026 |
| 4.0.10 | 1,530 | 3/4/2026 |
| 4.0.9 | 6,275 | 1/2/2026 |
| 4.0.8 | 2,227 | 11/20/2025 |
| 4.0.7 | 1,536 | 11/6/2025 |
Document DataTables request binding