I have problems mapping a overrided property from a POCO object to database using TPH in Code First.
My code is similar to these classes:
public abstract class Vehicle
{
public int ID { get; set; }
public abstract NumberOfWheels { get; set;}
}
public class Motorbike: Vehicle
{
public override NumberOfWheels { get; set; }
}
When I try to save the Motorbike class to Database I get the next message
The property 'NumberOfWheels' is not a declared property on type 'Motorbike'. Verify that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation. Make sure that it is a valid primitive property.
It seems like code first can't map override properties. Is there any suggestion how to map an override property with Code first?
Thanks