標籤:sql style ant 讀取 log blog png variant 添加
錯誤1:
定的架構無效。錯誤: DataModel.ssdl(2,2) :
錯誤 0152: 未找到具有固定名稱“System.Data.SqlClient”的 ADO.NET 提供者的Entity Framework提供者。請確保在應用程式設定檔的“entityFramework”節中註冊了該提供者。有關詳細資料,請參閱 http://go.microsoft.com/fwlink/?
解決辦法,將以下代碼添加至web.config設定檔中即可:
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
引用:
錯誤2:無法讀取配置節“entityFramework”,因為它缺少節聲明
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
同個項目寫webservice引用EF出現的問題