enisn / 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. The first aim is to be compatible with Open API 3.0 Specifications
MIT License
458 stars 37 forks source link

Refactor & Code-Cleaning #19

Closed enisn closed 3 years ago

enisn commented 3 years ago

Summary

This PR includes no new feature. This is PR includes HUGE CORE CHANGES. As simple; these improvements that makes library more extensible & refactoring-easy. By the way, some of bug fixes are included in this PR.

Migration guide to v2.6

Follow this document step by step if you're migration from v2.5.x to v2.6.x, if you're on older version, let's follow old migrations before this documentation:

1 - First step is 'Don't worry!' Just update your AutoFilterer nuget packages.

2 - Fix namespaces

AutoFilterer v2.6 comes with namespace changes. AutoFilterer.Enums changed as AutoFilterer.

If some of files have duplicated using AutoFilterer line, you'll get warnings at compile-time. You can use resharper or similar tools to fix it.

3 - Remove obsolete FilterBases Only if you've PaginationFilterBase<T> type which is marked as obsolete before. You need to say good bye to it.

4 - Remove CombineWith overrides If you've overrided any of CombineWith() method, you shouldn't! Remove it and use Attribute Chaining feature.

public class MyRange<T> : Range<T> where T : struct, IComparable
{
-  public override Expression Combine(Expression left, PropertyInfo right)
-  {
-       // Some your custom logic...
-  }
}
codefactor-io[bot] commented 3 years ago

CodeFactor found an issue: A closing curly bracket must not be preceded by a blank line.

It's currently on: src\AutoFilterer.Dynamics\DynamicFilter.cs:97 Commit e8c3d721fbfb9dc829751a7d4556ef7af8a9a8ea

enisn commented 3 years ago

Namespace changes are disabled for now.