RepoDB Error - There is no database setting mapping found for 'System.Data.SqlClient.SqlConnection'
Good day!
When I was working with RepoDB ORM I encountered this error {"There is no database setting mapping found for 'System.Data.SqlClient.SqlConnection'. Make sure to install the correct extension library and call the bootstrapper method. You can also visit the library's installation page (http://repodb.net/tutorials/installation)."}. I may have skipped a step in the docs or basically used the wrong RepoDB package for my app.
So to fix the issue I made sure that the package I installed was the RepoDB.SQLServer Nuget package and call the SqlServerBootstrap.Initialize() method in my application. In ASP.NET MVC, I added this code in Global.asax.cs Application_Start() method.
In WPF, I added the one liner code in the MainWindow's constructor method.
Cheers!
When I was working with RepoDB ORM I encountered this error {"There is no database setting mapping found for 'System.Data.SqlClient.SqlConnection'. Make sure to install the correct extension library and call the bootstrapper method. You can also visit the library's installation page (http://repodb.net/tutorials/installation)."}. I may have skipped a step in the docs or basically used the wrong RepoDB package for my app.
So to fix the issue I made sure that the package I installed was the RepoDB.SQLServer Nuget package and call the SqlServerBootstrap.Initialize() method in my application. In ASP.NET MVC, I added this code in Global.asax.cs Application_Start() method.
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); RepoDb.SqlServerBootstrap.Initialize(); }
public MainWindow()
{
InitializeComponent();
RepoDb.SqlServerBootstrap.Initialize();
}
Cheers!
Comments
Post a Comment