title: In which layer should the domain model go?
body: <p>We have to code a digital signage app for an University project.  The language  and frameworks we are using initially are :.Net, C#, entity framework (with plans to use NHibernate), Winforms (with plans to use WPF).</p>
  
  <p>We were told to do so in a way which would allows us to change the presentation and persistence logic easily. </p>
  
  <p>Because of this,we decided to work with three layers: the UI layer which "knows" the service layer (or business logic layer), the service layer which knows the persistence layer and the persistence layer. Each of them is a separate project.
  At the moment, the domain classes or entity classes (in this case, classes such as Campaign, RSSFeed, User, etc) are contained in a "Model" namespace under the persistence project or layer. </p>
  
  <p>We have defined some interfaces for the data access logic, In order to be able to switch the storage media easily.</p>
  
  <p>The questions would be: if in order to change the persistence logic we would have to change the actual project references for those of the replacement (eg. Entity Framework for NHibernate) where should this interfaces be defined? More importantly, where should the domain classes be defined? Is it "valid" to add another layer named for example "Domain", known by the persistence layer and the Service layer?</p>
  
  <p>I apologize if something I wrote comes off as strange, my written English is somewhat rusty.</p>