Hierarchy:
- abstract Package
- ServerPackage: Package
- ClientPackage: ServerPackage
In terms of EF CF, all three tables have a one-to-one relationship. Have I selected the right composition to cater to the following scenario?
Scenario:
- Abstract Package is created by the server upon request with unique Guid.
- Server creates ServerPackage and sends to client.
- Client processes ServerPackage and creates a ClientPackage to send back to server.
In other words, as soon as a Package request comes in, a ServerPackage AND a ClientPackage should be created. I am assuming this will not work since I need both packages to be tied to the same abstract Package Id.
Should I be using composition instead of inheritance and force a one-to-one relationship?
Please advise.