The Azure Code Samples are currently available in English
Developing a .NET Core console app using DocumentDB
This sample shows you how to use the Microsoft Azure DocumentDB service to store and access data from a .NET Core console application.
For a complete end-to-end walkthrough of creating this application, please refer to the full tutorial on the Azure documentation page.
Running this sample
- Before you can run this sample, you must have the following prerequisites:
- An active Azure account. If you don't have one, you can sign up for a free account.
- Alternatively, you can use the Azure DocumentDB Emulator for this tutorial.
- If you're working on MacOS or Linux, you can develop .NET Core apps from the command-line by installing the .NET Core SDK for the plaform of your choice.
- If you're working on Windows, you can develop .NET Core apps from the command-line by installing the .NET Core SDK.
- You can use your own editor, or download Visual Studio Code which is free and works on Windows, Linux, and MacOS.
Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file.
If using the DocumentDB Emulator, please follow instructions at Azure DocumentDB Emulator to install and start the emulator.
If using your Azure DocumentDB account, please substitute the endpoint and authorization key in Program.cs with your account's details.
- From a command prompt or shell, run
dotnet restorefollowed by
dotnet runto run the sample.
About the code
The code included in this sample is intended to get you quickly started with a .NET Core console application that connects to Azure DocumentDB.