Introduction

Azure Cosmos DB emulator is an exciting tool for getting started with Cosmos Db. This allows us to play with Cosmos DB without even having an Azure Subscription. That means you can write Cosmos DB code in your .net application and view your data on emulator.

System Requirements

You cannot run emulator on Window 7, 8. Below are the software and hardware requirements

Download Cosmos DB Emulator

You can download emulator from Microsoft Download Center

Running Cosmos DB Emulator

Data Explorer

Downloading Sample Project

You can download following sample project from Quick Start menu

Let’s download a sample project for .Net and open it in Visual Studio.

Exploring .Net Sample Project

It is a simple To DO List web application written using MVC and Cosmos DB

Let’s view web.config file. You can find two main settings registered in web.config required for Cosmos DB connectivity.

Azure Cosmos DB

In Production Environment you need to replace values of these two settings with actual values.

You can explore DocumentDbRepository.cs file to observe CRUD operation code.

Running Sample Project

View Cosmos DB Data

To view Cosmos DB data:

  1. Open Data Explorer
  2. Click on Explorer menu
  3. You can observe data under ToDoList database

    Azure Cosmos DB

Reference