'Passing appsettings.json connection string from .Net Core Web API to class library
I am working on a requirement where I have a .Net Core Web API and a class library project as DAL layer which connects to SQL DB. I have defined SQL connection string in appsettings.json and I want to use it in class library when I have to make a connection with SQL DB. I am using ADO.Net for establishing SQL connection here.
Can anyone please help me on how to pass on connection string value from Web API project to DAL layer?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
