I tried to find some information in topic: EntityConnection error The specified named connection is either not found in the configuration
Now I found another solution - to open .config file and create key in connectionstrings. But my question is that - Entity Model add connectionstrings to app.config file. ConfigurationManager.OpenExeConfiguration open myApplication.exe.config file.
Use OpenMappedExeConfiguration
in combination with ExeConfigurationFileMap
to specify the file name:
ConfigurationManager.OpenMappedExeConfiguration(
new ExeConfigurationFileMap() { ExeConfigFilename = "your file path here" }, ConfigurationUserLevel.None);