我在共享文件中有一个实体框架edmx,我正在创建我的db上下文,但是当我有
时<add name="UniteCmsEntities" connectionString="metadata=res://*
/DataModels.UniteCMSDB.csdl|res://*/DataModels.UniteCMSDB.ssdl|res:
//*/DataModels.UniteCMSDB.msl;provider=System.Data.SqlClient;provider
connection string="data source=WIN-M71FFCH83PK\SQLFREELANCE28R2; initial catalog=openfire;integrated security=True;MultipleActiveResultSets=True;
App=EntityFramework"" providerName="System.Data.EntityClient" />
这是我得到的错误
[无法加载指定的元数据资源。]
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName,String resourceName,ICollection
1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +599 System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection
1 uriRegistry,MetadataArtifactAssemblyResolver resolver)+171 System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path,ExtensionCheck extensionCheck,String validExtension,ICollection1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +63 System.Data.Metadata.Edm.MetadataCache.SplitPaths(String paths) +503 System.Data.Common.Utils.<>c__DisplayClass0.<Evaluate>b__1() +18 System.Data.Common.Utils.Result.GetValue() +130 System.Data.Common.Utils.Memoizer
2.Evaluate(TArg arg)+340 System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)+301 System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection()+ 21 System.Data.Objects.ObjectContext..ctor(EntityConnection连接,布尔isConnectionConstructor)+163 System.Web.UI.WebControls.EntityDataSourceView.ConstructContext()+ 452 System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)+105 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments参数,DataSourceViewSelectCallback回调)+17 System.Web.UI.WebControls.DataBoundControl.PerformSelect()+ 175 Telerik.Web.UI.GridTableView.PerformSelect()+ 16
在我的root项目的web.config中,我有这个意味着我有正确的连接字符串所以我完全失去了我使用visual studio 2015 ef5.0和sql server 2008 R2
<connectionStrings>
<add name="UniteCmsEntities" connectionString="metadata=res://*/DataModels.UniteCMSDB.csdl|res://*/DataModels.UniteCMSDB.ssdl|res: //*/DataModels.UniteCMSDB.msl;provider=System.Data.SqlClient;provider connection string="data source=WIN-M71FFCH83PK\SQLFREELANCE28R2;initial catalog=openfire;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="UniteCmsEntitiesDal" connectionString="metadata=res://*/DataModels.UniteCmsModel.csdl|res://*/DataModels.UniteCmsModel.ssdl|res://*/DataModels.UniteCmsModel.msl;provider=System.Data.SqlClient;provider connection string="data source=WIN-M71FFCH83PK\SQLFREELANCE28R2;initial catalog=openfire;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
有人知道如何解决这个问题吗?