Reputation: 32391
Does anyone know if there are performance benefits from using the WebAPI rather than just using an MVC controller which returns JSON?
Upvotes: 5
Views: 1735
Reputation: 346
I think the benefits are more related to flexibility than performance. You can implement a rest service using the MVC way, but the Web API provides a cleaner model: the actions are implicit in the HTTP verbs, the content can be delivered both in JSON and XML, there is native support to return an IQueryable< T > (this can be seen as a small performance improvement), and it can be integrated with an ASP.NET Web Forms application (or even a console app, with no ASP.NET at all).
Upvotes: 3