Hi,
I have a solution in which there are 2 projects
1. DotNet Core API 2.2
2. DotNet Core Class library
There is a connection string defined in appsettings json file in api project. I want to read that connection string in class library project via dependency injection and return connection object.
I have tried different approaches to resolve but nothing seems to be working for me.
Can anyone explain or suggest a detailed example which can be reference point to implement the same.
Thanks in advance.
Thanks
Dheeraj
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Veerendra AnnigerePosted Dec 24, 2019, 1:13 PM
Usage Example: