An open API service indexing awesome lists of open source software.

https://github.com/azure-samples/cosmos-db-apache-cassandra-dotnet-samples

Sample .NET applications for Azure Cosmos DB for Apache Cassandra
https://github.com/azure-samples/cosmos-db-apache-cassandra-dotnet-samples

apache-cassandra azure cosmos-db dotnet

Last synced: 6 months ago
JSON representation

Sample .NET applications for Azure Cosmos DB for Apache Cassandra

Awesome Lists containing this project

README

          

# Azure Cosmos DB for Apache Cassandra client library samples for .NET

[![Validate .NET code samples](https://github.com/Azure-Samples/cosmos-db-apache-cassandra-dotnet-samples/actions/workflows/validate.yml/badge.svg)](https://github.com/Azure-Samples/cosmos-db-apache-cassandra-dotnet-samples/actions/workflows/validate.yml)

## Getting started

This repo has a [devcontainer](https://containers.dev) environment making it easy to get started.

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure-Samples/cosmos-db-apache-cassandra-dotnet-samples?quickstart=1)

### Run the app

Configure your Azure Cosmos DB credentials as environment variables.

```bash
export COSMOS_ENDPOINT=""
export COSMOS_KEY=""
```

> **💡 TIP**: If you don't have an Azure Cosmos DB account, [create a free account](https://cosmos.azure.com/try/).

Run the quickstart sample app using the [`CassandraCSharpDriver`](https://www.nuget.org/packages/CassandraCSharpDriver/) package from NuGet.

```bash
cd 001-quickstart/
dotnet add package CassandraCSharpDriver
dotnet run
```

### Validate any changes you make

If you change the code, run the formatter and test the build.

```bash
dotnet format

dotnet build
```