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
<PackageReference Include="Soenneker.DataTables.Attributes.Searchable" Version="4.0.23" />
<PackageVersion Include="Soenneker.DataTables.Attributes.Searchable" Version="4.0.23" />
<PackageReference Include="Soenneker.DataTables.Attributes.Searchable" />
paket add Soenneker.DataTables.Attributes.Searchable --version 4.0.23
#r "nuget: Soenneker.DataTables.Attributes.Searchable, 4.0.23"
#:package Soenneker.DataTables.Attributes.Searchable@4.0.23
#addin nuget:?package=Soenneker.DataTables.Attributes.Searchable&version=4.0.23
#tool nuget:?package=Soenneker.DataTables.Attributes.Searchable&version=4.0.23
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 | 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 (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 | 70 | 8/30/2026 |
| 4.0.22 | 42 | 8/29/2026 |
| 4.0.21 | 132 | 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 |
Improve searchable attribute README