In my Asp.Net Core API, I have some repository classes I'm injecting by using the services.AddTransient method in my Startup.cs
services.AddTransient<IRepository, Repository>();
I'm also loading a section of my appsettings.json into a custom object in the Startup.cs
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
My repository class needs to load the db connection string from the appsettings.json. Is there a way to inject these settings straight to the repository class? Or is it up to the constructor of the controller to pass the connection string to the repository class?