2015-07-21 32 views
1

我使用DbExtensions/SqlBuilder.md爲我的項目。在連接期間,我收到了錯誤。如何設置的ConnectionString爲DbExtensions/SqlBuilder?

默認提供者的名稱必須使用 提供「DbExtensions:DefaultProviderName」中的appSettings 配置部分關鍵。

我的ConnectionString是Session對象。 這是我的代碼。

Database db = new Database(HelperClass.ConnectionString); 

回答

1

最後我得到了解決方案。 添加在Web.config文件中的關鍵。

<add key="DbExtensions:DefaultProviderName" value ="System.Data.SqlClient"/> 

它會工作。