Why would one use ASP.NET Web API Controller when we can return JSON using MVC controller?
Asked
Active
Viewed 559 times
0
-
1Different pipes, same result - minor changes. you can use a web api controller in a MVC project, it's just easier for apis IMO. – Royi Mindel Jan 14 '18 at 19:54
1 Answers
2
Data formats, content negotiation, self-hosting(avoiding IIS) and importance of method signature are the key reasons to use web api. Please have a look at the following links and it will help you in understanding the difference between the both:-
http://www.binaryintellect.net/articles/7bfdd512-91e3-49a4-865d-6dd03ace73fb.aspx

Atul Chaudhary
- 3,698
- 1
- 31
- 51