PowerEntwickler / Example-FeatureFlags

Sample application using ASP .Net 6.0 to use Azure App Configuration and Feature Flags.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azure App Configuration & Feature Flags

Sample application using ASP .Net 6.0 to use Azure App Configuration and Feature Flags.

Based on the following examples:

Create the resources

Requirements

Script

az group create --name FeatureFlag --location eastus
az appconfig create --resource-group FeatureFlag --name UNIQUECONFIGNAME --location westus --enable-public-network
az appconfig kv set -n UNIQUECONFIGNAME --key TestApp:Settings:BackgroundColor --value '#FFF' -y
az appconfig kv set -n UNIQUECONFIGNAME --key TestApp:Settings:FontColor --value '#000' -y
az appconfig kv set -n UNIQUECONFIGNAME --key TestApp:Settings:FontSize --value '24' -y
az appconfig kv set -n UNIQUECONFIGNAME --key TestApp:Settings:Message --value 'Data from Azure AppConfiguration' -y
az appconfig feature set -n UNIQUECONFIGNAME  --feature  'Beta' -y
dotnet new mvc --no-https --output TestAppConfig
cd TestAppConfig
dotnet user-secrets init
dotnet add package Microsoft.Azure.AppConfiguration.AspNetCore
dotnet add package Microsoft.FeatureManagement.AspNetCore
$cons = az appconfig credential list -n 'UNIQUECONFIGNAME' --query '[0].connectionString'
dotnet user-secrets set ConnectionStrings:AppConfig $cons

About

Sample application using ASP .Net 6.0 to use Azure App Configuration and Feature Flags.

License:MIT License


Languages

Language:HTML 53.0%Language:C# 31.5%Language:CSS 12.9%Language:JavaScript 2.7%