Soenneker.DataTables.Attributes.Searchable 4.0.23

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

DataTableSearchableAttribute marks model properties that a server-side DataTables query layer may include in search operations.

Installation

dotnet add package Soenneker.DataTables.Attributes.Searchable

Usage

using Soenneker.DataTables.Attributes.Searchable;

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

    [DataTableSearchable]
    public required string Email { get; init; }

    public string? InternalNote { get; init; }
}

Use reflection to build an explicit allow-list for a server-side search expression:

using System.Reflection;

PropertyInfo[] searchableProperties = typeof(CustomerRow)
    .GetProperties(BindingFlags.Instance | BindingFlags.Public)
    .Where(property => property.IsDefined(typeof(DataTableSearchableAttribute)))
    .ToArray();

This package does not parse requests or generate queries. The consuming layer decides how each marked type is searched. Parameterize user-supplied search text, and avoid applying string operations indiscriminately to dates, numbers, or identifiers.

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.Searchable:

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 130 8/30/2026
4.0.22 42 8/29/2026
4.0.21 135 7/28/2026
4.0.20 108 7/16/2026
4.0.19 121 6/18/2026
4.0.18 110 6/5/2026
4.0.17 118 4/22/2026
4.0.16 126 3/12/2026
4.0.15 115 3/12/2026
4.0.14 124 3/12/2026
4.0.13 124 3/12/2026
4.0.12 113 3/10/2026
4.0.11 121 3/9/2026
4.0.10 117 3/9/2026
4.0.9 112 3/9/2026
4.0.8 125 3/4/2026
4.0.7 133 1/2/2026
4.0.6 423 11/21/2025
4.0.5 218 11/6/2025
4.0.4 222 10/29/2025
Loading failed

Improve searchable attribute README