Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markup Goals #18

Open
enisn opened this issue Dec 14, 2020 · 0 comments
Open

Markup Goals #18

enisn opened this issue Dec 14, 2020 · 0 comments
Assignees
Milestone

Comments

@enisn
Copy link
Owner

enisn commented Dec 14, 2020

The Goal

Future of AutoFilterer aims to be a markup design pattern instead of using comparisons and binary operations.

Features

There are some planned features will be included in v3

Chaining Attributes

AutoFilterer will allow chaining multiple filter attributes with Binary operator attributes such as And & Or.
See following example

public MyFilterDto : FilterBase
{
    [StringFilterOptions(StringFilterOption.Contains)]
    [Or]
    [StringFilterOptions(StringFilterOption.StartsWith)]
    public string Title { get; set; }
}

Comparision Selection

AutoFilterer will allow choosing target property for comparison type. For example, your ToLowerContains comparison will be applied to Title but, Equal filter will be applied to Language

public MyFilterDto : FilterBase
{
    [CompareString(StringFilterOption.Contains, "Description")]
    [And]
    [CompareOperator(OperatorType.Equal, "Title")]
    public string Search { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant