Ive setup a solution with a .net core class library project and an asp.net core web api project. To use my class library I added the interface via ConfigureServices, where DataRepo is a class in the class library.

```
public void ConfigureServices(IServiceCollection services)
{
    services.AddScoped<IDataRepo, DataRepo>();
    services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}

```

This class library needs to get the environment-specific connection string that will be in the API project file appsettings.json. How can I pass config settings over to it? Also, I wan to add an EF core datamodel in the library project and Id rather not register a DbContext with the API project, but rather in the constructor of my library, use the connection info to pass along with the config in the DbContext. First things first, How can I get the config settings from the appsettings.json to my class library?

```
namespace DataLib
{
    public class DataRepo : IDataRepo
    {

        public DataRepo()
        {

        }

        public string GetHello()
        {
            return "hello from lib";
        }
    }
}

```