-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
Description
How can I make a derived property not filterable?
Given
public class Base
{
public int Prop { get; }
}
public class Derived : Base;
I would expect configuring the base entity to be good enough, but:
var builder = new ODataModelBuilder();
var baseType = builder.EntityType<Base>();
baseType.Property(b => b.Prop).IsNotFilterable();
var derived = builder.EntityType<Derived>().DerivesFrom<Base>();
leaves Prop filterable. Other attempts fail as well:
// Cannot redefine property 'Prop'...
// derived.Property(d => d.Prop).IsNotFilterable();
// doesn't do anything
derived.Filter(false, "Prop");
What am I missing?