This is a simple Blazor web application to illustrate common basic usage of Azure Cosmos DB for MongoDB with .NET
-
Log in to Azure Developer CLI. This is only required once per-install.
azd auth login
-
Initialize this template (
cosmos-db-mongodb-dotnet-quickstart
) usingazd init
.azd init --template cosmos-db-mongodb-dotnet-quickstart
-
(Optional) Select either
vcore
orrequest-unit
account type usingazd env set
.azd env set "MONGODB_DEPLOYMENT_TYPE" "vcore"
azd env set "MONGODB_DEPLOYMENT_TYPE" "request-unit"
-
Ensure that Docker is running in your environment.
-
Use
azd up
to provision your Azure infrastructure and deploy the web application to Azure.azd up
-
Observed the deployed web application
-
(Optionally) Run this web application locally in the
src/web
folder:dotnet watch run