Soenneker.DataTables.Extensions.ServerSideRequest 4.0.197

Prefix Reserved
There is a newer version of this package available.
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
                    
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.Extensions.ServerSideRequest" Version="4.0.197" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.DataTables.Extensions.ServerSideRequest" Version="4.0.197" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.DataTables.Extensions.ServerSideRequest" />
                    
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.Extensions.ServerSideRequest --version 4.0.197
                    
#r "nuget: Soenneker.DataTables.Extensions.ServerSideRequest, 4.0.197"
                    
#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.Extensions.ServerSideRequest@4.0.197
                    
#: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.Extensions.ServerSideRequest&version=4.0.197
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.DataTables.Extensions.ServerSideRequest&version=4.0.197
                    
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.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 Length is 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 asc or desc;
  • ignores properties marked with JsonIgnore and 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 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.

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
Loading failed

Harden DataTables request conversion