1

I am getting a bit confused about how an N Layered MVC application should look. I am thinking as standard there should be:

ASP .NET MVC Project
Service Layer
Data Access Layer (containing repositories)

I am confused as to where the entity framework model should sit (.edmx). Should it be in the Data Access Layer? Should any partial classes of the entities sit in the service layer? Should any partial classes sit with the edmx model?

Any advise on creating n layered applications is welcomed.

Thanks

D'Arcy Rittich
  • 167,292
  • 40
  • 290
  • 283
user375564
  • 79
  • 9
  • 1
    Take a look here: http://stackoverflow.com/questions/3747383/best-practices-to-partition-model-code-to-logical-parts-in-mvc-which-is-the-best . Not all of what you're looking for, but may be a good start – Oren A Sep 23 '10 at 19:59

1 Answers1

0

I usually put my Entity Framework edmx file in the Data Layer. I add a folder call Repositories, and put the repositories in there - AppName.Data.Repositories.

Then I have my Business Layer (Service Layer), and then my Web Project (MVC).

Martin
  • 11,031
  • 8
  • 50
  • 77