Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.4 KB

README.md

File metadata and controls

41 lines (34 loc) · 1.4 KB

.NET 6 PoCs

Using Startup Class with .NET 6

Comparing the Problem & ProblemDetails Results

Setting up Serilog

Setting up Seq

docker pull datalust/seq

docker run --name seq -d --restart unless-stopped -e ACCEPT_EULA=Y -p 5341:80 datalust/seq:latest

Configurations - Options pattern in ASP.NET Core

Configuration -> GetSection -> Bind

 var localAppSettings = new AppSettings();
_configuration.GetSection(AppSettings.Key).Bind(localAppSettings);

Configuration -> Get Section - Get

var localAppSettings = _configuration.GetSection(AppSettings.Key).Get<AppSettings>();

Services -> Configure

services.Configure<AppSettings>(Configuration.GetSection(AppSettings.Key));

Service -> AddOptions -> Bind

services.AddOptions<TokenSettings>().Bind(Configuration.GetSection(TokenSettings.Key));