Is it possible to create a simple convention to modify the polymorphism mode of a class, if there is a joined-subclass ?
Doing this :
public class EntityMap : ClassMap<EntityBase>
{
public EntityMap()
{
Polymorphism.Explicit();
}
}
but inside a convention. Using IClassConvention doesn't work, as the Polymorphism property is read only :
public class TestConvention : IClassConvention
{
public void Apply(IClassInstance instance)
{
// read only property !
instance.Polymorphism = Polymorphism.Explicit;
}
}
Try
instance.Polymorphism.Explicit();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With