Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"