private String?GenerateQuery(LookupColumn column, PropertyInfo?property, Int32 index) { if (property?.PropertyType == typeof(String)) { LookupFilterMethod method = column.FilterMethod ?? FilterMethod; return($"({column.Key} != null && {ConvertCase(column)}.{method}(@{index}))"); } return(IsFilterable(property?.PropertyType) ? $"{column?.Key} = @{index}" : null); }
private Object?ParseSearch(LookupColumn column, PropertyInfo?property) { if (property?.PropertyType == typeof(String)) { LookupFilterCase filterCase = column.FilterCase ?? FilterCase; return(filterCase switch { LookupFilterCase.Upper => Filter.Search?.ToUpper(), LookupFilterCase.Lower => Filter.Search?.ToLower(), _ => Filter.Search });