I have a Visual Studio 2010 Entity Framework 4 WPF project and I’m not saving my connection string in app.config. This seems to be confusing the EF designer, since it wants to take the name of the entity container from the name of the connection string, which doesn’t exist. The main problem I’m having is that every time I update from the database, my entity container is renamed to “Entities”. Since this isn’t the name I want, I have to refactor the name back after every update.
Other than adding a named connection string to app.config, is there any way to stop Visual Studio from messing with my entity container name?
The name of your context has nothing to do with your connection strings. It retrieves the name from the model property
Entity Container Name. So open up your .edmx file and assign this property to whatever you like.