MrSimonC / CSharp-Minimal-API-Table-Storage-SDK-Template

Example C# Minimal APIs with Azure Table Storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table Storage Api Template

A working example template showing:

Two examples have been created:

Usage

In appsettings.json, update TableStorageConnectionString to either the connection string for your Azure Table Storage account, or your Azure Cosmos for Table (i.e. specially created CosmosDb-Table edition).

See the differences between the two types of account here.

This template code has been successfully tested with both Azure Table Storage account and Azure Cosmos for Table.

Optional API_KEY authentication

  • Uncomment app.AddApiKeyMiddleware() to require an X-API-KEY passed on each endpoint
  • The calling entity must pass an "X-API-KEY" header
  • This header must match the contents of environment variable "API_KEY"

About

Example C# Minimal APIs with Azure Table Storage

License:MIT License


Languages

Language:C# 100.0%