I'm new to ASP.NET MVC and I'm trying to figure out the right way of coding in it.
I'm trying to implement a multi-layer architecture with a generic repository for data access.
Here's what I was used to do in Webforms solutions (each item is a separate project):
Now in an MVC pattern:
I think I should define my ViewModels in MyProject.Business.DomainModel and my Models in MyProject.Business.Services. And Data layer remains unchanged. In summary:
I'll appreciate your comments about this approach.
Check out the onion architecture. http://jeffreypalermo.com/blog/the-onion-architecture-part-1/
Codecampserver is an implementation example. http://codecampserver.codeplex.com/
SharpArchitecture is another example to look at. http://code.google.com/p/sharp-architecture/
They dont do things exactly the same but they do separate concerns.