title: No connection string named xxx' could be found in the application config file
body: <p>My solution have three projects: <br>
  <a href="https://i.stack.imgur.com/HDufN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HDufN.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>dll Library that has the edmx EF Core used as DAL for Oracle database<br></li>
  <li>library for business logic that references the mentioned above dll<br></li>
  <li>ASP.NET Core webservice application that reference the business logic dll<br><br></li>
  </ul>
  
  <p>All three target the same version of .NET framework: 4.6.1</p>
  
  <p>To get the webservice to work and access the database I had to copy the App.config file from EntityFramework project to the Webservice project.</p>
  
  <p>Everything was working fine until I decided migrating from ASP.NET 5 RC1 to ASP.NET Core 1.0.</p>
  
  <p>After migration the web.config appeared in the webservice project root directory (other than the one that has been there under wwwroot folder) and I ran into the error mentioned <a href="https://stackoverflow.com/questions/37928200/how-can-i-stop-asp-net-from-blocking-access-to-files-then-throwing-access-denied">here</a> apparently because now I have two configuration files (app.config and web.config), the solution of removing the app.config made sense.</p>
  
  <p>So I copied the all the sections from the app.config to the web.config and removed the app.config, which solved my first problem but now whenever I try to use the <code>DBContext</code>, I'm stuck with this exception:</p>
  
  <blockquote>
    <p>An exception of type 'System.InvalidOperationException' occurred in
    EntityFramework.dll but was not handled in user code</p>
    
    <p>Additional information: No connection string named
    'DBEntities' could be found in the application config file.</p>
  </blockquote>
  
  <p>I noticed that the after publishing the application, the file myApp.exe.config does not have the connection strings any more. My question is simple, how do I get the application to look for the connection string in the web.config?!</p>
  
  <p>I found some similer questions like <a href="https://stackoverflow.com/questions/12622408/no-connection-string-named-myentities-could-be-found-in-the-application-config">this</a> one, <a href="https://stackoverflow.com/questions/33121941/asp-net-5-no-connection-string-named-myentities-could-be-found-in-the-applic">that</a> and <a href="https://stackoverflow.com/questions/29876511/no-connection-string-named-myappdbcontext-could-be-found-in-the-application-co">that</a>
  but none of them has answers to my question.</p>