This is a brief translation of the question How to get ConnectionString from EF7 DbContext
I use EF core 2.0 for typical CRUD operations and at the same time Dapper for more complex and fast requests.
In the startup.cs file, I inject DbContext in the DAL layer repository for EF, and dapper uses a connection string for work. I want to make DbContext EF get the string to insert into the Dapper request.
How can I get a connection string from DbContext?
Configuration.GetConnectionString("MyConnectionname")to the constructor? - AK ♦