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
public class Animal {
public string Name { get; set; }
}
public class Dog : Animal
{
public string Breed { get; set; }
}
Adding a filter like the following works (as it is mentioned in the Wiki): .Filter(x => x as Dog != null)
But filtering a property of the derived entity does not: .Filter(x => (x as Dog).Breed.Contains("Terrier"))
I am getting the following error:
NotSupportedException: Not supported expression of type System.Linq.Expressions.PropertyExpression (MemberAccess): (x As Dog).Breed
Simple.OData.Client.ODataExpression.ParseMemberExpression(Expression expression, Stack<MemberInfo> memberChain)
My final goal would be something like .Filter(x => x.Name.Contains("Terrier") || (x as Dog).Breed.Contains("Terrier"))
The issue #622 is marked as closed, but the main examples do no work.
The text was updated successfully, but these errors were encountered:
Hi there,
I have something like
Adding a filter like the following works (as it is mentioned in the Wiki):
.Filter(x => x as Dog != null)
But filtering a property of the derived entity does not:
.Filter(x => (x as Dog).Breed.Contains("Terrier"))
I am getting the following error:
My final goal would be something like
.Filter(x => x.Name.Contains("Terrier") || (x as Dog).Breed.Contains("Terrier"))
The issue #622 is marked as closed, but the main examples do no work.
The text was updated successfully, but these errors were encountered: