I have a Web API application that uses one controller which returns data read from a file.
So all I'm using is the C (Controller) part of MVC. I have no Views, and I'm not using Models, either - I'm storing and retrieving the data to/from the App_Data folder.
I know this is a rather simple solution, but it seems that all I need is C, not MVC. Am I missing something?
Model-View-Controller is a design pattern, to help structure applications that have a GUI. ASP.NET MVC is a framework that helps you build a web application according to this design pattern.
Web API has nothing to do with the MVC design pattern. It was developed separately, temporarily distributed under the same umbrella name and now an own framework altogether: http://www.asp.net/web-api
The fact that some project templates still create "Model" and "Views" directories in your project, means that you're using an outdated project template or one that's assuming you want MVC and Web API in one project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With