I am using EF6 in a class library (database first)
When I followed the wizard and added my tables I selected not to store the connections string in the app.config an
So much better way to do this. The issue with any change of the diagram or properties the context.cs is rewritten. The clue is that all of the files are written as partial class objects. So, in order not to need to rewrite the context every time you change the entity framework, add a new cs file outside the EntityFramework edmx with a partial class with just the snippets discussed in previous posts.
public partial class cerviondemoEntities
{
public cerviondemoEntities(string connectionString):base(connectionString){}
}
This was kind of discussed in the most approved post, but it was easy to glance over. This should stop your code from not working if you change the EntityFramework properties. This was important to me because my application needed to connect to remote SQL databases.