How to set connectionstring for DbExtensions/SqlBuilder?

266 Views Asked by At

I am using DbExtensions/SqlBuilder.md for my project. And during connection I am getting following Error.

A default provider name must be provided using the 'DbExtensions:DefaultProviderName' key in the appSettings configuration section.

My ConnectionString is in Session object. Here is my Code.

Database db = new Database(HelperClass.ConnectionString);
1

There are 1 best solutions below

0
On

Finally I got solution. Add key in Web.config file.

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

and it will work.