Search code examples
entity-frameworkmodel-view-controlleref-database-first3-tier

3 tier Architecture using EF5 with Database-first approch in MVC 4


I am new to MVC and EF. I use to follow 3 tier architecture before with asp.net with BO,BLL,DAL,UI(asp.net webform).

I want to follow same with MVC4 in UI layer, in replace of webform.

I have generated my entity from database in DAL but now I am confused what is the use of BO layer now ? Because all my entity are in DAL layer itself.

Also I will create Viewmodel classes in model folder so don't know how the flow will go now.

I am confused about the architecture now, please suggest if I am doing it correct or not, or is there any different approach I have to take for best practice,

PS: I don't wanna use single layer in my project. I think EF save our time by creating BO classes and enable sp used as functions and we don't have to use Ado.net repetitive code again and again.


Solution

  • As finally no help I got from 29 views counts, So I opted to create BO again from my project, DAL consist of E.F and UI have Viewmodels and ViewmodalList.