ClientFiltering 1.0.0
See the version list below for details.
dotnet add package ClientFiltering --version 1.0.0
NuGet\Install-Package ClientFiltering -Version 1.0.0
<PackageReference Include="ClientFiltering" Version="1.0.0" />
paket add ClientFiltering --version 1.0.0
#r "nuget: ClientFiltering, 1.0.0"
// Install ClientFiltering as a Cake Addin #addin nuget:?package=ClientFiltering&version=1.0.0 // Install ClientFiltering as a Cake Tool #tool nuget:?package=ClientFiltering&version=1.0.0
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
- 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.
- 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 | Versions 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. |
-
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 | 281 | 3/24/2023 |
2.0.6 | 203 | 3/24/2023 |
2.0.5 | 204 | 3/23/2023 |
2.0.4 | 197 | 3/23/2023 |
2.0.3 | 200 | 3/23/2023 |
2.0.2 | 195 | 3/23/2023 |
2.0.1 | 197 | 3/23/2023 |
1.0.15 | 220 | 3/14/2023 |
1.0.14 | 1,105 | 12/12/2022 |
1.0.13 | 587 | 10/4/2022 |
1.0.12 | 473 | 8/30/2022 |
1.0.11 | 379 | 8/25/2022 |
1.0.10 | 380 | 8/25/2022 |
1.0.9 | 372 | 8/25/2022 |
1.0.8 | 385 | 8/24/2022 |
1.0.7 | 388 | 8/18/2022 |
1.0.6 | 375 | 8/18/2022 |
1.0.5 | 840 | 9/10/2021 |
1.0.4 | 352 | 9/10/2021 |
1.0.3 | 345 | 9/10/2021 |
1.0.2 | 559 | 8/3/2021 |
1.0.1 | 297 | 8/3/2021 |
1.0.0 | 300 | 8/3/2021 |
Initial Release