I'm implementing similar wrapper like this. But, my question is how do I add configuration in appsettings.json to this

Refer to this thread Implementation and usage of logger wrapper for Serilog

In the Program.cs file in .NET 6

IConfiguration conf = (new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json") .Build());

var builder = WebApplication.CreateBuilder(options); builder.Services.AddScoped();



Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept