Array Search
Array search, provides filtering with multiple parameters for single property. Just make your filter object property as array and see the magic!
Showcase
- Entity
// Entity
public class Book
{
public string Id { get; set; }
public string Title { get; set; }
public PublishStatus Status { get; set; }
}
public enum PublishStatus
{
Waiting,
Rejected,
Reviewed,
Published,
}
- Filter object
public class BookFilter : PaginationFilterBase
{
public PublishStatus[] Status { get; set; } // <-- Make this array, see the magic!
}
Also you can use [ArraySearchFilter]
attribute if your field type is not array but IEnumerable:
public class BookFilter : PaginationFilterBase
{
[ArraySearchFilter] // <-- Use this attribute if your field is not array.
public List<PublishStatus> Status { get; set; }
}