Skip to content
This repository has been archived by the owner on Sep 7, 2019. It is now read-only.

This sample shows you how get started quickly with Microsoft Azure DocumentDB service and .NET

License

Notifications You must be signed in to change notification settings

Azure-Samples/documentdb-dotnet-getting-started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

services platforms author
cosmos-db
dotnet
andrewhoh

Developing a .NET console app using Azure Cosmos DB

This sample shows you how to use the Azure Cosmos DB service to store and access data from a .NET console application.

.NET Console application

For a complete end-to-end walkthrough of creating this application, please refer to the full tutorial on the Azure Cosmos DB documentation page.

Running this sample

  1. Before you can run this sample, you must have the following prerequisites:
    • An active Azure Cosmos DB account - If you don't have an account, refer to the Create a database account article.
    • Visual Studio 2013 (or higher).

2.Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file.

3.From Visual Studio, open the GetStarted.sln file from the root directory.

4.In Visual Studio Build menu, select Build Solution (or Press F6).

5.Retrieve the URI and PRIMARY KEY (or SECONDARY KEY) values from the Keys blade of your Azure Cosmos DB account in the Azure portal. For more information on obtaining endpoint & keys for your Azure Cosmos DB account refer to View, copy, and regenerate access keys and passwords

If you don't have an account, see Create a database account to set one up.

6.In the App.config file, located in the src directory, find endpoint and authKey and replace the placeholder values with the values obtained for your account.

<add key="EndPointUrl" value="~your Azure Cosmos DB endpoint here~" />
<add key="AuthorizationKey" value="~your auth key here~" />

7.You can now run and debug the application locally by pressing F5 in Visual Studio.

About the code

The code included in this sample is intended to get you quickly started with a .NET console application that connects to Azure Cosmos Db.

More information

About

This sample shows you how get started quickly with Microsoft Azure DocumentDB service and .NET

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages