Question: what is the difference between web api controller and mvc controller?
Answer: Web API decides the data format automatically based on the Accept header. MVC controller, on the other hand, requires you to explicitly specify the data format (ActionResult or JsonResult) while writing the action methods.