ClientFiltering 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package ClientFiltering --version 1.0.2
NuGet\Install-Package ClientFiltering -Version 1.0.2
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="ClientFiltering" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ClientFiltering --version 1.0.2
#r "nuget: ClientFiltering, 1.0.2"
#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.
// Install ClientFiltering as a Cake Addin
#addin nuget:?package=ClientFiltering&version=1.0.2

// Install ClientFiltering as a Cake Tool
#tool nuget:?package=ClientFiltering&version=1.0.2

Client Filtering

Overview

This library uses a standard set of models and enumerations that can be passed on WebAPI endpoints and allow dynamic client side filtering, sorting, take and skip similar to oData without the cerimony, complex string functions, or the MASSIVE overhead of oData.

Combined with the Flutter responsive_data_grid or Kendo UI Grid control for example you can easily provide full featured server side filtering, sorting, and paging in a single line of code.

Getting Started

Add the nuget library

dotnet package add clientfiltering

Create an HttpGet endpoint within an ApiController

[HttpGet("SomeGet")]
public Task<ActionResult<IEnumerable<SomeDto>>> List([FromBody] LoadCriteria? criteria = null, [FromService] DbSession session, CancellationToken cancellationToken = default) {
    return session.SomeCollection.ApplyLoadCriteria(criteria).ToArrayAsync(cancellationToken);
}

With a single line, we can apply our LoadCriteria to our collection which results in an IQueryable which you can then materialize or otherwise return whatever you wish.

Flutter

Check out the responsive_data_grid control for a full implementation that "Just Works" (TM) and provides advanced functionality for a data grid.

Kendo UI Grid and other grid style controls

Because of the structure of this library it is generally trivial to convert Kendo UI's grid or other similar products to generate HTTP requests for data that filter, sort and page using this library as it is styled after the basic functionality in Kendo UI Grid.

TODOs

  1. It would be nice if on .NET that this library was strongly typed when used as a client or allowed you to use Linq against the objects and would generate a LoadCriteria.
  2. It would be nice to add direct T-SQL implementations or other language specific implementations outside of Entity Framework. This library has already been proven to work nicely with RavenDB as an example.

Contributing

Pull requests most welcome to fix any bugs found or address any of the above TODOs or any additional functionality you'd like to see.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

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
2.0.7 271 3/24/2023
2.0.6 199 3/24/2023
2.0.5 199 3/23/2023
2.0.4 193 3/23/2023
2.0.3 196 3/23/2023
2.0.2 191 3/23/2023
2.0.1 192 3/23/2023
1.0.15 216 3/14/2023
1.0.14 1,098 12/12/2022
1.0.13 580 10/4/2022
1.0.12 467 8/30/2022
1.0.11 373 8/25/2022
1.0.10 374 8/25/2022
1.0.9 365 8/25/2022
1.0.8 379 8/24/2022
1.0.7 381 8/18/2022
1.0.6 366 8/18/2022
1.0.5 832 9/10/2021
1.0.4 345 9/10/2021
1.0.3 339 9/10/2021
1.0.2 552 8/3/2021
1.0.1 289 8/3/2021
1.0.0 293 8/3/2021

Initial Release