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
Post a Comment