没有连接字符串称为" ...实体"可以在应用程序文件中找到但它在那里?

时间:2015-08-14 13:28:48

标签: c# wpf mvvm entity-framework-6 connection-string

您好,我在xaml这一行收到错误(无连接字符串,名为" BuildingSettingsEntities"可在应用程序文件中找到):

 d:DataContext="{d:DesignInstance Type=viewModel:BuilderViewModel, 
 IsDesignTimeCreatable=True}"

但是我将此连接字符串添加到我的app.config中,如下所示:

<connectionStrings>
<add name="BuildingSettingsEntities" 
connectionString="metadata=res://*/BuildingSettingsModel.csdl|res://*/BuildingSettingsModel.ssdl|res://*/BuildingSettingsModel.msl;
provider=System.Data.SqlClient;
provider connection string=&quot;
data source=mrdk.database.windows.net,1433;
initial catalog=BuildingSettings;
persist security info=True;
user id=test;
password=testingpassword1234;
MultipleActiveResultSets=True;
App=EntityFramework&quot;" 
providerName="System.Data.EntityClient" />

我无法为我的生活弄清楚为什么会这样,所以任何帮助都会受到高度赞赏。

由于

0 个答案:

没有答案