Soenneker.DataTables.Dtos.ServerResponse 4.0.23

Prefix Reserved
dotnet add package Soenneker.DataTables.Dtos.ServerResponse --version 4.0.23
                    
NuGet\Install-Package Soenneker.DataTables.Dtos.ServerResponse -Version 4.0.23
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.DataTables.Dtos.ServerResponse" Version="4.0.23" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.DataTables.Dtos.ServerResponse" Version="4.0.23" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.DataTables.Dtos.ServerResponse" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.DataTables.Dtos.ServerResponse --version 4.0.23
                    
#r "nuget: Soenneker.DataTables.Dtos.ServerResponse, 4.0.23"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.DataTables.Dtos.ServerResponse@4.0.23
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.DataTables.Dtos.ServerResponse&version=4.0.23
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.DataTables.Dtos.ServerResponse&version=4.0.23
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.DataTables.Dtos.ServerResponse

DataTableServerResponse produces the JSON envelope expected by DataTables when serverSide processing is enabled.

Installation

dotnet add package Soenneker.DataTables.Dtos.ServerResponse

Successful response

using Microsoft.AspNetCore.Mvc;
using Soenneker.DataTables.Dtos.ServerResponse;

public IActionResult GetCustomers(int draw)
{
    CustomerRow[] page = GetCurrentPage();

    return Ok(DataTableServerResponse.Success(
        draw: draw,
        recordsTotal: 12_430,
        recordsFiltered: 87,
        data: page));
}

The serialized response uses DataTables' required property names:

{
  "draw": 3,
  "recordsTotal": 12430,
  "recordsFiltered": 87,
  "data": []
}

recordsTotal is the count before search filters. recordsFiltered is the count after filtering but before paging. data contains only the requested page.

Always echo the parsed integer draw from the request; do not copy an untrusted raw string into a response.

Failed response

return Ok(DataTableServerResponse.Fail(request.Draw, "Unable to load customers."));

Keep Error suitable for display and log internal exception details separately. The optional ContinuationToken is a package extension for storage systems that page by cursor; DataTables itself does not manage that token automatically.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.DataTables.Dtos.ServerResponse:

Package Downloads
Soenneker.Blazor.DataTables

A Blazor interop library for DataTables

Soenneker.Quark.Suite

Shadcn-powered Blazor UI, refined and modular.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.23 1,019 9/4/2026
4.0.21 2,385 8/29/2026
4.0.20 13,327 7/27/2026
4.0.19 5,382 7/16/2026
4.0.18 8,884 6/18/2026
4.0.17 7,456 6/5/2026
4.0.16 10,771 4/22/2026
4.0.15 10,492 3/12/2026
4.0.14 126 3/12/2026
4.0.13 125 3/12/2026
4.0.12 130 3/12/2026
4.0.11 1,122 3/10/2026
4.0.10 778 3/9/2026
4.0.9 119 3/9/2026
4.0.8 232 3/9/2026
4.0.7 1,250 3/4/2026
4.0.6 5,818 1/2/2026
4.0.5 2,101 11/20/2025
4.0.4 2,374 10/29/2025
3.0.3 7,782 9/3/2025
Loading failed

misc