我使用實體框架4與我的Asp.Net MVC3應用程序。我的問題是,我正在使用實體框架來執行與我的數據庫的行動,這是工作正常。爲了其他目的,我也使用Sql連接來存儲和從數據庫中檢索我的數據。我得到不支持的關鍵字:'metadata'。?與Entityt框架與MVC3的Sql連接
[Keyword not supported: 'metadata']
與我的數據庫連接時出錯。
這是我的web配置
<add name="VibrantEntities" connectionString="metadata=res://*/Vibrant.csdl|res://*/Vibrant.ssdl|res://*/Vibrant.msl;provider=System.Data.SqlClient;provider connection string="data source=KAPS-PC\KAPSSERVER;initial catalog=vibrant;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
我使用的類庫,所以這是我的應用程序配置。
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="VibrantEntities" connectionString="metadata=res://*/Vibrant.csdl|res://*/Vibrant.ssdl|res://*/Vibrant.msl;provider=System.Data.SqlClient;provider connection string="data source=KAPS-PC\KAPSSERVER;initial catalog=vibrant;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
我沒有得到你,你能解釋更多 –