AutoFilterer Save

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 with Open API 3.0 Specifications

Project README

Logo

AutoFilterer

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. 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.

This library does not generate database queries directly. It generates LINQ Expressions.

You can check Documentation for getting started.

Nuget Docs CodeFactor .NET Pipeline Gitmoji

Getting Started

  • Install AutoFilterer NuGet package from here.

Vsit visit documentation to learn how to use AutoFilterer.

↗️ Open in Visual Studio Code


Usage

A quick example is presented below. Reading documentation 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


Sponsors


Stats

Alt

Open Source Agenda is not affiliated with "AutoFilterer" Project. README Source: enisn/AutoFilterer

Open Source Agenda Badge

Open Source Agenda Rating