Using DocumentDB Stored Procedures
DocumentDB supports the use of Stored Procedures.
Andrew Liu wrote a tutorial on DocumentDB server-side programming: Stored procedures, database triggers, and UDFs.
After working my way through Andrew’s and other tutorials, I thought about what are the Use Cases for using DocumentDB Stored Procedures.
For some time now, I have been developing an REST API for Azure DocumentDB.
The main reason is DocumentDB does have it’s own REST API, but does not provide an API Connector for it.
I created a Swagger API using GitHub. For those not familiar with a Swagger you can view the documentation. You can create an free account on SwaggerHub, and create your own. You can also test it and use their code generator to generate client or server code as shown below.
Swagger Code Generation
I have made my GitHub project public.
There you can find the Swagger I created along with the code for an API App generated from the Swagger.
You can download and build the project in Visual Studio 2015. I refactored the code using Resharper.
I would appreciate any feedback.
If you would like to collaborate on the project, please use the following form to contact me