Can entity framework ignore the fact that I am implementing interfaces in an entity? The situation is that I have a Tag class that implements IModelObject interface which defines that every class that implements it needs to have Id property. The class is below:
public class Tag : IModelObject, IEquatable<Tag>
{
[ScaffoldColumn(false)]
public virtual int Id
{
get;
set;
}
[Required]
public virtual string Name
{
get;
set;
}...
}
And every entity in my domain model implements IModelObject. There is no base class, just an interface. Default mapping works, but in the database Discriminator column is added. And this Discriminator is not part of my domain model so I don't need it in my database.
Implementing an interface is not an inheritance, I am also implementing an IEquatable interface. So why does Entity Framework acts like this is inheritance and adds Discriminator column and how can I avoid this by not using base or abstract classes?