Donate

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.
protected void Application_Start()
{
	AreaRegistration.RegisterAllAreas();
	RouteConfig.RegisterRoutes(RouteTable.Routes);
	RepoDb.SqlServerBootstrap.Initialize(); 
}
In WPF, I added the one liner code in the MainWindow's constructor method.
public MainWindow()
{
	InitializeComponent();
	RepoDb.SqlServerBootstrap.Initialize();
}


Cheers!

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.

Invalid nested tag div found, expected closing tag input