Hi,
I am using Entity Framework POCO to generate some self-tracked data objects, and I exposing these objects from a WCF service interface.
I have EntityA & EntityB, which both map to different tables in the database.
I would like both EntityA and EntityB to inherit from a base 'Entity' class, so that I can implement a simple WCF service interface like this:
void Save(Entity entity)
IEnumerable<Entity> GetEntities()
void Delete(Entity entity)
In the entity framework designer I add an entity called 'Entity' and make 'EntityA' & 'EntityB' inherit 'Entity'. However, entity framework complains because 'Entity' does not have a key, and is not mapped to a table in the database.
Is there anyway that I can give these two entities a base class, which is not represented in the database?
Thanks in advance!