I'm working on a .net core 7 application. I have to implement a minimal api using a service class. In this service class, i've to access to appsettings. In the program.cs file, i have the following lines :
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddJsonFile("appsettings.Local.json", true);
builder.Configuration["groupParameterOne:ParameterA"];
I need to access to appsettings from a service class but i don't know how to inject the builder in my service class.
I can implement a static class to set and access my settings but i don't think it's the right way to do that.
Thanks in advance for your help.