You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a setter method for Filter and set Country.Name parameter at t he same time with Filter:
publicclassCityFilterDto:PaginationFilterBase{privatestringfilter;[CompareTo("Name")][StringFilterOptions(StringFilterOption.Contains)]publicstringFilter{get=>filter;set=>SetFilter(value);}publicCountryFilterDtoCountry{get;set;}privatevoidSetFilter(stringvalue){filter=value;// keep backing field.if(Country==null)Country=newCountryFilterDto();Country.Name=value;this.CombineWith=CombineType.Or;// Make sure combines with || instead of &&}}
That's it! Nested query will work properly. This solution is temporary until solution of this issue.
Following situation doesn't work for
Country.Name
:Expected Expression is:
.Where(x => x.Name.Contains("Turkey") || x.Country.Name.Contains("Turkey"))
Generated Expression is
.Where(x => x.Name.Contains("Turkey").Where(x.Name.Contains("Turkey")))
The text was updated successfully, but these errors were encountered: