page_type | languages | products | description | urlFragment | ||
---|---|---|---|---|---|---|
sample |
|
|
This sample shows you how to use the Microsoft Azure DocumentDB service to store and access data from a .NET Core console application. |
documentdb-dotnet-core-getting-started |
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.
- 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.
- Visual Studio 2015 Update 3 and .NET Core 1.0.1 - VS 2015 Tooling Preview 2
- 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 restore
followed bydotnet run
to run the sample.
The code included in this sample is intended to get you quickly started with a .NET Core console application that connects to Azure DocumentDB.