I want to use WebApi as a standalone app for data access.
When i create a new MVC 4 project, it installs a bunch of crap that I’m not interested for this purpose.
Should I remove the views, content, scripts etc.
or would you recommend WCF for this purpose?
Also, different browsers return different data formats, such as Firefox returns XML, IE return json.
I want all of them to return JSON. With WCF if json is configured they all return return JSON. how can I enforce webapi to return only json for all browsers?
any thoughts?
You can create an empty project and just pull in the nugets to get all the web api functionality.
To force JSON only, the easiest approach is clear the global formatters collection and then just add back the JSON formatter.