Soenneker.DataTables.Dtos.ServerSideRequest
4.0.29
Prefix Reserved
dotnet add package Soenneker.DataTables.Dtos.ServerSideRequest --version 4.0.29
NuGet\Install-Package Soenneker.DataTables.Dtos.ServerSideRequest -Version 4.0.29
<PackageReference Include="Soenneker.DataTables.Dtos.ServerSideRequest" Version="4.0.29" />
<PackageVersion Include="Soenneker.DataTables.Dtos.ServerSideRequest" Version="4.0.29" />
<PackageReference Include="Soenneker.DataTables.Dtos.ServerSideRequest" />
paket add Soenneker.DataTables.Dtos.ServerSideRequest --version 4.0.29
#r "nuget: Soenneker.DataTables.Dtos.ServerSideRequest, 4.0.29"
#:package Soenneker.DataTables.Dtos.ServerSideRequest@4.0.29
#addin nuget:?package=Soenneker.DataTables.Dtos.ServerSideRequest&version=4.0.29
#tool nuget:?package=Soenneker.DataTables.Dtos.ServerSideRequest&version=4.0.29
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.29 | 2,705 | 9/15/2026 |
| 4.0.28 | 3,301 | 9/12/2026 |
| 4.0.27 | 9,192 | 8/30/2026 |
| 4.0.25 | 11,869 | 7/28/2026 |
| 4.0.24 | 4,425 | 7/21/2026 |
| 4.0.23 | 3,532 | 7/16/2026 |
| 4.0.22 | 9,609 | 6/18/2026 |
| 4.0.21 | 6,874 | 6/5/2026 |
| 4.0.20 | 132 | 6/5/2026 |
| 4.0.19 | 11,151 | 4/22/2026 |
| 4.0.18 | 10,658 | 3/12/2026 |
| 4.0.17 | 136 | 3/12/2026 |
| 4.0.16 | 123 | 3/12/2026 |
| 4.0.15 | 246 | 3/12/2026 |
| 4.0.14 | 1,209 | 3/10/2026 |
| 4.0.13 | 955 | 3/9/2026 |
| 4.0.12 | 135 | 3/9/2026 |
| 4.0.11 | 177 | 3/9/2026 |
| 4.0.10 | 1,540 | 3/4/2026 |
| 4.0.9 | 6,281 | 1/2/2026 |
Update dependency dotnet-sdk to v10.0.401 (#277)