I have an MVC application. I have build two layers BLL and DAL and it is ready to use.
I'd like to add a service layer: I learned about Asp.Net Web API and I'd like to use it to build this layer.
In the book of Adam Freeman ( Pro Asp.net MVC4) I read this
You can freely mix regular controllers and API controllers in a project. In fact, you will usually need to if you want to support HTML clients because API controllers will only return object data and will not render a view.
So, I'd like to know in which cases I have to use one of this solution :
- Using Asp.Net MVC application and a web API ( as a service layer)
- Mixing the two applications in a web API application