title: Entity Framework 6 Error Unable to load the specified metadata resource
body: <p>I'm using  Entity Framework 6 and "model first" in my solution, I separated my "Data Model" classes into another project, so that I can add reference to the "Data Model" classes without exposing my "Data Model Contexts" and connections.
  I don't want to expose my Entity Data Model project (especially the DB Context etc) to my UI Layer. I have this:</p>
  
  <p><img src="https://i.stack.imgur.com/1YKkP.png" alt="enter image description here"></p>
  
  <p>I have now successfully separated my auto generated entity classes from my data model, I tried it this works by adding an entity or a property to an entity is updated in the project Mapeo.BusinessEntity.</p>
  
  <p>This is my connection string from DatabaseLayer (Mapeo.DatabaseModel)</p>
  
  <pre><code>&lt;connectionStrings&gt;
     &lt;add name="MapeoModelContainer" connectionString="metadata=res://*/MapeoModel.csdl|res://*/MapeoModel.ssdl|res://*/MapeoModel.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=raranibar\ral;initial catalog=Mapeo;user id=sa;password=*****;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>In my service layer I it copied this connection string to the App.config, my problem is this when I want to add a data I have this message: <strong>Unable to load the specified metadata resource</strong> How I can resolve this problem?</p>
  
  <p><img src="https://i.stack.imgur.com/EPGZ0.png" alt="enter image description here"></p>
  
  <p><strong>Updated</strong>
  I found the solution, I changed the connectionstring in App.Config the pretentation layer I replaced in the connection strign "*" for the directory of DataModel in my case (Mapeo.DatabaseModel) this is now my connection string in layer presentation: </p>
  
  <pre><code>  &lt;connectionStrings&gt;
       &lt;add name="MapeoModelContainer" connectionString="metadata=res://Mapeo.DatabaseModel/MapeoModel.csdl|res://Mapeo.DatabaseModel/MapeoModel.ssdl|res://Mapeo.DatabaseModel/MapeoModel.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=raranibar\ral;initial catalog=Mapeo;user id=sa;password=scugua;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>