After Entity upgrade, database inserts not working
After Entity upgrade, database inserts not working

We upgraded Entity framework in a .NET Core project to 7.0 and suddenly inserts into a SQL Table were no longer working – nothing got inserted and there was no error. Let’s check the breaking changes document: https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes SQL Server tables with triggers or certain computed columns now require special EF Core configuration Old behaviorPrevious... » read more

Some NuGet packages were installed using a different target framework and may need to be reinstalled
Some NuGet packages were installed using a different target framework and may need to be reinstalled

Updating a .NET website from 4.6 to 4.8 and after updating all the packages in Visual Studio’s package NuGet Package manager, I got the following warning that wouldn’t go away: Following that link https://docs.nuget.org/docs/workflows/reinstalling-packages it suggested updating your packages would fix it, which it didn’t for me. So then I tried re-installing each package in... » read more

Migrating multiple databases into a single Azure SQL DB
Migrating multiple databases into a single Azure SQL DB

If you have a bunch of databases that you want to migrate into a single Azure SQL DB, and the table names are all different then that’s quite easy. If you don’t mind renaming things, then there’s a solution for same-named tables too… Add/migrate one database Head over to the Azure SQL section https://portal.azure.com/#create/Microsoft.AzureSQL Create... » read more

An unhandled exception occurred while processing the request. Win32Exception: An existing connection was forcibly closed by the remote host
An unhandled exception occurred while processing the request. Win32Exception: An existing connection was forcibly closed by the remote host

Azure .NET web apps connecting to an AWS SQL database kept throwing up this error sporadically, seemingly without any pattern. The full message was this: An unhandled exception occurred while processing the request. Win32Exception: An existing connection was forcibly closed by the remote host. Unknown location.SqlException: A connection was successfully established with the server, but... » read more

#C .NET Core, JsonConvert fails to convert null to bool
#C .NET Core, JsonConvert fails to convert null to bool

Newtonsoft.Json.JsonSerializationException: ‘Error converting value {null} to type “System.Boolean”. Code like this can generate the error: This happens when the bool field in your source is null, and the model you’re converting into’s matching field does not allow nulls. If you don’t mind this field being null in your destination model item, then you can just... » read more