WebApi and MVC controllers

robertnac

New Member
I'm planning to have both MVC and WebAPI functionality in my application. There's going to be an administration site implemented with simple MVC CRUD controllers and I also need a RESTful API to be called from the remote client and possibly from a single page app in the future.I'm not too comfortable with writing very similar classes that differ only in return type - MVC controllers returning data wrapped in a View and WebAPI controllers simply returning data unwrapped.What would be the best way to achieve my goals without repeating too much code?
 
Back
Top