MongoDB is a popular NoSQL database that makes it a great backend for Web APIs which lend themselves towards a document store rather than a relational store . In this blog we show how you can use MongoDB with ASP.NET Web API to build an ApiController with support for HTTP GET, PUT, POST, and DELETE. Our sample controller is a simple contact manager Web API which builds on many of the same concepts as in the tutorial " Creating a Web API that Supports CRUD Operations " so I would recommend that you skim that for background. In particular, the URI patterns are very similar to that of the tutorial: Action HTTP Method Relative URI Get a list of all contacts GET /api/contacts Get a filtered list of all contacts GET /api/contacts?$top=2 Get a contacts...(read more) ...
Go to the complete details ...