https://github.com/kdcllc/dotnet-cosmosdb
DotNet Core Cosmosdb sample code
https://github.com/kdcllc/dotnet-cosmosdb
azure-cosmos-db cosmosdb dotnetcore dotnetcore-tool
Last synced: 8 months ago
JSON representation
DotNet Core Cosmosdb sample code
- Host: GitHub
- URL: https://github.com/kdcllc/dotnet-cosmosdb
- Owner: kdcllc
- License: mit
- Created: 2019-12-09T11:44:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T12:54:24.000Z (almost 6 years ago)
- Last Synced: 2025-01-03T01:54:13.738Z (10 months ago)
- Topics: azure-cosmos-db, cosmosdb, dotnetcore, dotnetcore-tool
- Language: C#
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DotNetCore CosmosDb Sample
Command line utility to execute SQL commands against CosmosDb
- System.CommandLine.Experimental
- Microsoft.Extensions.Hosting## Configuration
Make sure that Azure Vault contains the following entries
```
CosmosDb:Endpoint
CosmosDb:AuthKey
CosmosDb:DatabaseName
CosmosDb:ContainerName
```## Run
[Making a tiny .NET Core 3.0 entirely self-contained single executable](https://www.hanselman.com/blog/MakingATinyNETCore30EntirelySelfcontainedSingleExecutable.aspx)
```bash
dotnet tool install dotnet-warp -g
# https://docs.microsoft.com/en-us/dotnet/core/rid-catalog?WT.mc_id=blog-blog-timheuer#windows-rids
dotnet build -c Release -r win-x64
dotnet publish -c Release --self-contained -r win-x64
# or# https://docs.microsoft.com/en-us/dotnet/core/rid-catalog?WT.mc_id=blog-blog-timheuer#linux-rids
dotnet build -c Release -r linux-x64
dotnet publish -c Release --self-contained -r linux-x64dotnet run -a:https://{vaultName}.vault.azure.net/ -q:"SELECT * FROM c where c.Book ='Moby'" del
```