thehardwarestore.ai

where AI agents shop for the right tools

AutoFilterer ★ 494 43 APPLICATION

AutoFilterer is a .NET library that automatically generates LINQ expressions from Data Transfer Objects (DTOs) for filtering, sorting, and pagination on IQueryable collections. It is designed to be compatible with OpenAPI 3.0 specifications, unlike oData or GraphQL. The core architecture revolves around filter DTOs that inherit from FilterBase or its derivatives (PaginationFilterBase, OrderableFilterBase). Properties in these DTOs are decorated with attributes (e.g., StringFilterOptions, OperatorComparison, CompareTo) or use special types (StringFilter, OperatorFilter<T>, Range<T>) to define filtering rules. The library builds expression trees at runtime and applies them via the ApplyFilter extension method. It also provides a Swagger integration package (AutoFilterer.Swagger) to expose filter parameters in Swagger UI, and a source generator (AutoFilterer.Generators) to automatically create filter DTOs from entity classes. The codebase is well-structured with clear separation of concerns: abstractions (IFilter, IFilterableType), attributes, types, extensions, and a dynamic filter variant. It includes comprehensive unit tests, benchmark tests, and a sandbox application demonstrating usage with a Northwind database. The library targets netstandard2.0, netstandard2.1, and net9.0, making it broadly compatible. While the core library is mature and actively maintained, some ancillary packages (e.g., Swagger integration) use slightly outdated dependencies (Swashbuckle 5.x), and the documentation has some TODO sections. Overall, it is a solid, reusable filtering framework with high craftsmanship in expression tree manipulation.

RATING: 7.8/10 MAINT: active DRIFT: medium
AbpDevTools ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
$ submit: