I have a Web API with 3 tier architecture as shown below:
PresentationLayer (in the presentation layer i have appsetting.json where the connection string is)
BusinessLayer (Class library)
DataLayer (class library)
When I was still using .Net Framework I used to do in the dataLayer this code shown in the link below to get the connection string from the web.config of the presentation layer:
Now days I am experimenting with .Net Core 2.1 and i have build the same class in the data layer but it is not working. how can I pass the connection string from the presentation layer to the data layer most efficient way. Is there a similar way how i used to pass the connection string when i was working with .Net framework.
Can you help me please.