21 November 2013

ASP.Net Web API vs ASP.NET MVC

ASP.Net Web API vs ASP.NET MVC
S.NoParticularsASP.NET WebAPIASP.NET MVC
1Create Web Appcreate full blown HTTP services with easy and simple way that returns only data not view.returns both views and data
2support content-negotiationYesNo
3returning dataJSON,XML or any other based upon the Accept header in the request and you don't worry about that.JSON format using JsonResult.
4request are mapped actions based on HTTP verbs mapped to actions name.
5assemblySystem.Web.HttpSystem.Web.Mvc
6mixed MVC and Web API controllerWeb API since boths are different.implement the authorization then you have to create two filters one for MVC

No comments: