AutoFilterer
AutoFilterer copied to clipboard
AutoFilterer is a mini filtering framework library for dotnet. The main purpose of the library is to generate LINQ expressions for Entities over DTOs automatically. The first aim is to be compatible w...
|
AutoFiltererAutoFilterer is a mini filtering framework library for dotnet. The main purpose of the library is to generate LINQ expressions for Entities over DTOs automatically. Creating queries without writing any expression code is the most powerful feature that is provided. The first aim of AutoFilterer is to be compatible with Open API 3.0 Specifications, unlike oData & GraphQL.
You can visit Wiki for documentation |
Getting Started
- Install
AutoFilterer
NuGet package from here.
Vsit visit documentation to learn how to use AutoFilterer.
Showcase
TRY LIVE DEMO now.
Usage
A quick example is presented below. Reading Wiki is highly recommended for detailed features.
- Create a filter model and make sure property names match to Entity properties.
public class ProductFilter : PaginationFilterBase
{
public Range<double> Price { get; set; }
[ToLowerContainsComparison]
public string Name { get; set; }
[StringFilteringOptions(StringFilterOption.Equals)]
public string Locale { get; set; }
}
public IActionResult GetProducts([FromQuery]ProductFilter filter)
{
var products = db.Products.ApplyFilter(filter).ToList();
return Ok(products);
}
Don't forget to visit Wiki for better understanding of usage.
AutoFilterer.Swagger
All parameters support OpenAPI 3.0 Specifications 👍
Improve your swagger documentation via using AutoFilterer.Swagger
AutoFilterer.Generators
AutoFilterer.Generators aims to generate filter objects from entities automatically via using dotnet source generators.
Visit documentation of Generators
Performance
See Benchmark Results from here