Pointing an existing ASPNET Core WebAPI from MongoDB to CosmosDB

Use case:

An existing Application was written using ASPNET Core pointing to an installed MongoDB in Ubuntu Server. Since CosmosDB is fully managed globally distributed NoSQL database and also supports Mongo API it is easy to reuse the same code and point it to CosmosDB by just changing the connection string at the application. No further code change is needed.


How to move data:

The data movement can be done using the CosmosDB Data Migration tool /en-us/azure/cosmos-db/import-data


I have created a video step by step guide on how to do it

Pointing ASP.NET Core Application from MongoDB To CosmosDB