0

Why would one use ASP.NET Web API Controller when we can return JSON using MVC controller?

1
  • 1
    Different pipes, same result - minor changes. you can use a web api controller in a MVC project, it's just easier for apis IMO. Commented Jan 14, 2018 at 19:54

1 Answer 1

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

Using WebAPI or MVC to return JSON in ASP.NET

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.