Posts

Showing posts from January, 2021

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() { InitializeCompo

WPF CRUD With DataGrid, RepoDB ORM And C#.NET

Image
Good day Gents, Here's a basic tutorial on how to integrate the RepoDB ORM into your WPF desktop application. I already have written an article in ASP.NET MVC web application here using the said ORM and I realized that I have to create an example for the desktop as well. To proceed working with the code, you need to run the create table script from this post WPF CRUD With DataGrid, Entity Framework And C#.NET . Next is to add a model class that maps the information from the database table to an object or list of objects. public class Students { public int ID { get ; set ; } public string Name { get ; set ; } public int Age { get ; set ; } public string Address { get ; set ; } public string Contact { get ; set ; } public Students() { ID = 0; Name = string .Empty; Age = 0; Address = string .Empty; Contact = string .Empty; } } Add an interface to the project that has the method signatures used in the actual repository class. The interface meth

Visual Studio Error - Unfortunately, a process used by Visual Studio has encountered an unrecoverable error

Image
Two days ago, my Visual 2017 Professional IDE was acting weirdly because of this error " Unfortunately, a process used by Visual Studio has encountered an unrecoverable error. We recommend saving your work, and then closing and restarting Visual Studio ". This error only shows up to a specific ASP.NET MVC project with multiple class libraries and NuGet packages. Other projects opened does not show this exception. As of this posting, my Visual 2017 IDE has been updated to the latest version which is 15.9.30 without any 3rd Party Plugins. Doing some research on the forums led me to different solutions offered like uninstall/re-install the Visual Studio IDE or delete the Newtonsoft.Json Version 9.0.0.0 located in C:\Windows\assembly\GAC_MSIL . The latter solution is not applicable since our Newtonsoft.Json version is 6.0.0. The solution that worked for me is the classic Windows band-aid fix that is to delete files located in temp folders on windows and ASP.NET. Here's wh

Donate