I am currently working on an intranet website that uses Active Directory and SQL Server 2008. I have chosen ASP.NET's MVC design pattern and am now trying to figure out how to get a proper architecture for my project concerning the Data Access part using Entity Framework. I have been struggling for days in order not to go in the wrong direction (knowing that I'm the only developer in my company, it's my first experience and nobody knows about recent Frameworks). I have read about architecture and how to do it right, but I am not sure I grasped everything correctly (How do architect an ASP.Net MVC app with EF?).
Here is what I was thinking of doing, each layer having their own project (pardon my drawing skills):
Controller(MVC Project) ---uses---> Service Layer (Project) ---uses--> EFDal (Project)
^ | ^ |
| | | |
|<-------<-----returns ViewModel |<---------<------returns Query Result
EFDal is EntityFramework Data Access Layer.
And from what I understood, Service layer would contain methods that call the DAL which in turn is used to access data.
Do you see something wrong in my approach?
Am I right in saying the Service Layer, is the one containing all operations? (eg: Searching a user in DB -> Service Layer launches search by calling EFDal which returns the value, and in turn Service Layer returns a ViewModel to the controller)
(also see: Creating a Service Layer for my MVC application?)
Finally, Should my Service layer classes implement Interfaces for persistence purposes?
As a student we only used MVC pattern for our projects, and never had to expand the solution with new projects because we worked on small projects. Here I feel like misconceiving the architecture will end up in disastrous maintainability. Thanks for your help!