3
votes

We are in the process of designing a domain model for a new application. The application consists of three layers. Some of the entities are common to all layers, where as some of the other entities are unique to a specific layer. A unique entity may contain a reference or be referenced by a shared entity. The code related to the unique entities will also be unique to the layer. We will be using Entity Framework 4.0 for persistence, with POCO's.

What are our options here with regard to:

  • Should we split the domain up? If so this would mean we would not be able to have references to non shared entities within a shared entities, and as such would have to externalise business logic associated to this entity.
  • If we share the domain across all layers, will we be able to define separate Entity Framework models for each layer as each layer has its own storage?

Any thoughts on either approach and best practices to follow would be appreciated.

Many Thanks

1

1 Answers

1
votes

I would have ONE model project - with your POCOs. That project can then be referenced by any layer.