views:

52

answers:

0

Currently my layered ASP.Net application is structured like this:

  1. Entity Layer (data model classes auto-created using T4 against my Entity Data Model (edmx) in the data layer)
  2. Data Layer (Containing the edmx)
  3. Business Layer
  4. UI Layer

The entity layer is referenced in all layers. My UI layer uses MVC 2.

I'd like to implement the unity framework but am unsure as to where to place the interfaces and the web.config definitions. The UI layer is a web application but all of the other layers are class libraries.

Should each layer contain the interfaces to communicate with the layer above it? Should I place all of the interfaces in the Entity Layer with my DataModel classes? Where does the <unity> web.config block of code go in this situation?

I downloaded the sample Unity project- http://msdn.microsoft.com/en-us/library/ff650806.aspx but that project only has 2 layers so I'm having a hard time relating that to my situation.