Soenneker.DataTables.Attributes.Orderable 4.0.23

Prefix Reserved
dotnet add package Soenneker.DataTables.Attributes.Orderable --version 4.0.23
                    
NuGet\Install-Package Soenneker.DataTables.Attributes.Orderable -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.Attributes.Orderable" 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.Attributes.Orderable" Version="4.0.23" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.DataTables.Attributes.Orderable" />
                    
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.Attributes.Orderable --version 4.0.23
                    
#r "nuget: Soenneker.DataTables.Attributes.Orderable, 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.Attributes.Orderable@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.Attributes.Orderable&version=4.0.23
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.DataTables.Attributes.Orderable&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.Attributes.Orderable

DataTableOrderableAttribute marks model properties that a server-side DataTables query layer may use for sorting.

Installation

dotnet add package Soenneker.DataTables.Attributes.Orderable

Usage

using Soenneker.DataTables.Attributes.Orderable;

public sealed class CustomerRow
{
    [DataTableOrderable]
    public required string Name { get; init; }

    [DataTableOrderable]
    public DateTimeOffset CreatedAt { get; init; }

    public string? InternalNote { get; init; }
}

A request-processing layer can inspect the requested column, find its corresponding property, and allow ordering only when that property has DataTableOrderableAttribute:

using System.Reflection;

PropertyInfo property = typeof(CustomerRow).GetProperty(nameof(CustomerRow.CreatedAt))!;
bool mayOrder = property.IsDefined(typeof(DataTableOrderableAttribute));

This package supplies the marker attribute only. It does not parse DataTables requests or apply OrderBy. Treat requested column names as untrusted input and map them to known properties instead of inserting them into a query string.

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 (1)

Showing the top 1 NuGet packages that depend on Soenneker.DataTables.Attributes.Orderable:

Package Downloads
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.23 59 8/30/2026
4.0.21 122 7/28/2026
4.0.20 105 7/16/2026
4.0.19 111 6/19/2026
4.0.18 114 6/5/2026
4.0.17 115 4/22/2026
4.0.16 133 3/12/2026
4.0.15 120 3/12/2026
4.0.14 115 3/12/2026
4.0.13 125 3/12/2026
4.0.12 126 3/10/2026
4.0.11 115 3/9/2026
4.0.10 123 3/9/2026
4.0.9 115 3/9/2026
4.0.8 120 3/4/2026
4.0.7 146 1/2/2026
4.0.6 458 11/20/2025
4.0.5 244 11/6/2025
4.0.4 256 10/29/2025
3.0.3 253 9/3/2025
Loading failed

Correct orderable attribute documentation