Explain ASP.NET WebApi vs MVC?

Technology CommunityCategory: ASP.NET MVCExplain ASP.NET WebApi vs MVC?
VietMX Staff asked 3 years ago

Usually, WebAPI used for data services where MVC can generate more types of outputs (like template HTML views).

  • WebAPI simplifies the way we can create REST data services. It’s clean and easy for this purpose.
  • MVC can generate any output WebAPI can output. Generating outputs from templates can be easily achieved in MVC. I can’t find a reason to do so in WebAPI.