The line fieldNames.Add(m.Member.Name.ToLowerInvariant()); in MemberProjectionExpressionVisitor.cs seems to convert all property names to lowercase, regardless of whether they are pascal or camel case. It's unclear if the Azure Search API previously permitted varying cases, but it appears to be causing issues now.
A quick solution was to eliminate the ToLowerInvariant() method, but a more robust approach might be to check for the JsonProperty attribute and use it as the default setting. Do you have any thoughts on this? Happy to create a PR with a solution.
"Invalid expression: Could not find a property named 'id' on type 'search.document'.\r\nParameter name: $select"
The line
fieldNames.Add(m.Member.Name.ToLowerInvariant());
in MemberProjectionExpressionVisitor.cs seems to convert all property names to lowercase, regardless of whether they are pascal or camel case. It's unclear if the Azure Search API previously permitted varying cases, but it appears to be causing issues now.A quick solution was to eliminate the
ToLowerInvariant()
method, but a more robust approach might be to check for theJsonProperty
attribute and use it as the default setting. Do you have any thoughts on this? Happy to create a PR with a solution.