Skip to content

Composite search filter can not search for Enums. #58

@Cubody

Description

@Cubody

I have such filter:

public class StudentInfoShortResponseFilter : PaginationFilterBase
{
    [CompareTo(nameof(StudentInfoShortResponse.FullName),
        nameof(StudentInfoShortResponse.AcademicGroup),
        nameof(StudentInfoShortResponse.StudentIdCard),
        nameof(StudentInfoShortResponse.Institute))]
    [StringFilterOptions(StringFilterOption.Contains)]
    [ToLowerContainsComparison]
    public string? Search { get; set; }
}

And when I'm trying to write in 'search' anything - it always gives me all records, not filtering it.
StudentInfoShortResponse.Institute - enum type.
If I'll delete this from attribute - it will search for other properties.

With such enum property in filter attribute it stops write filter in query.

If I'll write

public Institute? Institute {get;set;}

in filter - all will be fine too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions