ASP.NET MVC4 N-Tier Architecture: Better Approach

I am developing a three-tier architecture for MVC4 webapp + EntityFramwork5. I want to keep the separete layer, so only DAL knows that I use EF, for example.

In fact, I have many classes to manage this:

DAL

  • Entity POCO
  • Entity DataContext: DbContext
  • Object Repository

BL

  • Entity ViewModel
  • Entity Service (Entity Repository Instance)

WEB

  • Entity Controllers (Instance Entity Service)

This works, but is pretty hard to accomplish. I decided to delete the Entity repository in the DAL and use the DataContext directly (if I'm not mistaken, because the DbContext was created as a repository and work unit), but this will force me to add a link to EntityFramework.dll in my BL. Not a big problem, but I'm not sure if this is the best choice.

?

(, , , )

+5
1

this this .

An experienced Architect does not need to go through every single step in the book to get a reasonable design done for a small web

. . - , DMS. , , .

For those who do not have experience, let me briefly mention the general steps that involved in architecturing a software below...

Understand the initial customer requirement - Ask questions and do research to further elaborate the requirement
Define the process flow of the system preferably in visual (diagram) form. I usually draw a process-flow diagram here. In my

, . - , , .      ,      , "Water-Fall". undefined, "" .      , . , .     , . , (DMS), ASP.NET MVC ( ).      .
     , .      ( ER). - ( ) .      . , ..
     . . ( , , ), , .      - . . . / .

+5

All Articles