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

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)