November 2026
Every post published in November 2026, newest first. Pick a day to jump straight to it.
- Posts
- 1,091
- Topics
- 89
- Reading time
- 124 h
- Active days
- 16
Posts 961–990 of 1,091 · November 3–4, 2026
Page 33 of 37
Wednesday, November 4, 2026
19 of 91 posts
Fixed: "A second operation was started on this context instance before a previous operation completed" in EF Core
Running three EF Core queries with Task.WhenAll on one DbContext threw InvalidOperationException: A second operation was started on this context instance. And the same code sometimes worked, which makes it worse. Why a DbContext can't run two things at once, and the two ways to fix it.
7 min readFixed: "The instance of entity type cannot be tracked because another instance with the same key value is already being tracked" in EF Core
Calling Update on a new object after loading the same row threw InvalidOperationException: The instance of entity type 'Category' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. Why EF Core allows one object per row, and the simple way to update instead.
7 min readFixed: "JSON deserialization for type was missing required properties" in an ASP.NET Core Minimal API
Binding a request to a class with C# required properties failed with JsonException: JSON deserialization for type 'Category' was missing required properties including: 'name', and clients got a bare 400. Why the required keyword answers this way, and how a request record with validation gives a useful message.
6 min readFixed: "A possible object cycle was detected" When Returning EF Core Entities from a Web API
Returning EF Core entities from an ASP.NET Core endpoint failed with JsonException: A possible object cycle was detected, because Category has Products and each Product has a Category. Why Include causes it, why a Select to a response record is the real fix, and what ReferenceHandler.IgnoreCycles does instead.
7 min readFixed: DbUpdateConcurrencyException "The database operation was expected to affect 1 row(s), but actually affected 0 row(s)" in EF Core
DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s). Three real ways to get it with EF Core and MySQL: a stale concurrency token, a row someone else deleted, and Update on an ID that doesn't exist. How to tell which one you have, and how to answer each.
9 min readFixed: "Failure to infer one or more parameters" in an ASP.NET Core Minimal API
Every request to a minimal API answered 500 with InvalidOperationException: Failure to infer one or more parameters, listing clock as UNKNOWN. The endpoint asked for a service that was never registered. How to read the table in the message, and the one line that fixes it.
6 min readFixed: "InvalidCastException: Unable to cast object of type 'System.Attribute[]' to type 'IEnumerable`1[ValidationAttribute]'" with AsParameters in /openapi/v1.json
After adding a record with validation attributes and [AsParameters] to a minimal API, /openapi/v1.json answered 500 with InvalidCastException in ApplyParameterInfo. It's a known ASP.NET Core 10 bug, fixed for .NET 11. Putting property: on the attributes fixes it today, and validation keeps working.
7 min readFixed: "BadHttpRequestException: Failed to read parameter from the request body as JSON" Returns 500 Instead of 400 in a Minimal API
With UseExceptionHandler and ProblemDetails in ASP.NET Core 10, broken JSON and bad query values answered 500 in Development, logged as BadHttpRequestException, but 400 in Production. Why the two environments differ, and how StatusCodeSelector keeps the client's 400.
7 min readFixed: "Unable to retrieve project metadata. Ensure it's an SDK-style project." in dotnet ef
dotnet ef failed in a freshly cloned .NET project with error NETSDK1004: Assets file project.assets.json not found, and Unable to retrieve project metadata. Ensure it's an SDK-style project. The project is SDK-style: it just hasn't been restored yet. One command fixes it.
5 min readFixed: "The model for context has pending changes. Add a new migration before updating the database." in EF Core
dotnet ef database update printed The model for context 'InventoryDbContext' has pending changes, then No migrations were applied and Done, with exit code 0, while the new column was still missing from MySQL. Two causes: no migration for the change, or tools running on a stale build. How to tell them apart.
7 min readFixed: "The migration 'AddProductVersion' was not found." with dotnet ef --no-build
dotnet ef migrations script failed with System.InvalidOperationException: The migration 'AddProductVersion' was not found, seconds after dotnet ef migrations add created it. The migration file existed, but --no-build ran the tools on a DLL built before it. How to spot that, and when --no-build is safe.
5 min readFixed: "ERROR 1175 (HY000): You are using safe update mode" in MySQL
MySQL refuses an UPDATE or DELETE with ERROR 1175 when safe-updates mode is on and the WHERE doesn't use a key column. See which statements it lets through, why a WHERE on a plain column still fails, and how to work with it, not around it. Run on MySQL 9.7.
6 min readFixed: "ERROR 1364 (HY000): Field doesn't have a default value" in MySQL
MySQL refuses an INSERT with ERROR 1364 when a column that can't be NULL has no default and isn't in your statement. Here's how to read that from SHOW COLUMNS, what strict SQL mode has to do with it, and the two real fixes, run on MySQL 9.7.
6 min readFixed: MySQL Rounds a Decimal Like 9.999 to 10.00 Without an Error (Note 1265: Data truncated for column)
An API accepted a price of 9.999 and MySQL stored 10.00, with no error, even in strict mode. A DECIMAL(12,2) column rounds extra decimal places and only raises Note 1265, which EF Core never shows. How to see the note, and how to refuse such a value with a validation attribute.
7 min readFixed: "Data too long for column 'Name' at row 1" When Saving with EF Core and MySQL
A POST to an ASP.NET Core API answered 500 because a name was longer than its varchar(100) column: MySqlException: Data too long for column 'Name' at row 1, inside a DbUpdateException. How to find the column's limit, and how a StringLength attribute turns it into a clear 400.
7 min readFixed: "Unknown column 'p.Version' in 'field list'" with EF Core and MySQL
An ASP.NET Core API answered 500 with MySqlException: Unknown column 'p.Version' in 'field list' right after a new property was added to an EF Core entity. The C# model and the MySQL table disagreed. How to confirm that in one command, and how a migration fixes it.
7 min readFixed: "missed comma between flow collection entries" in Docusaurus Front Matter
A site check refused a blog post's front matter with missed comma between flow collection entries, and the comma was right there. In a YAML [ ] list, a # after a space starts a comment, and [ ] inside a word ends the list. Here are both causes, and the two fixes.
6 min readFixed: "ModuleNotFoundError: No module named 'PIL'" in Python
Python says No module named 'PIL', and pip install PIL fails too, because the package you need is called Pillow. Install it into a virtual environment, and run your script with that environment's Python. Real output from Python 3.15.2 and Pillow 13.0.0.
5 min readFixed: "montage: unable to read font" in ImageMagick on macOS
ImageMagick's montage printed unable to read font when asked for labels, and made a contact sheet with none. The cause was a build with no list of fonts. Name a font file with -font, before the images. Includes the silent mistake of putting the option after them.
5 min read
Tuesday, November 3, 2026
11 of 91 posts
How to Connect a .NET C# Web API to a MySQL Database — Part 2: Create MySQL Tables with EF Core Migrations
Create MySQL tables from C# classes with EF Core 10 migrations and Oracle's MySql.EntityFrameworkCore provider. Map each class to a table, choose MySQL column types for text, money, dates and enums, add a migration, read its SQL, apply it with dotnet ef database update, change the model with a second migration, and check every table from inside MySQL.
45 min readHow to See What Changed in a Git Repository Before You Commit (git status and git diff)
Check exactly what you're about to commit: git status lists changed, staged and new files, git diff shows the changed lines, and git diff --staged shows what the next commit will contain. Real output from a .NET C# project, including the short status codes.
9 min readHow to Apply EF Core Migrations with a Migrations Bundle (efbundle)
Build an EF Core migrations bundle with dotnet ef migrations bundle, read its options, run it against a database, and run it the way Microsoft recommends for deployments: with an explicit environment and the connection string from outside. Real output from EF Core 10 on MySQL 9.7, including two problems I hit.
8 min readHow to Register Services with an IServiceCollection Extension Method in ASP.NET Core (AddXyz Pattern)
Move a group of service registrations out of Program.cs into one AddXyz extension method on IServiceCollection, the way ASP.NET Core's own features do. A real example that registers an EF Core DbContext for MySQL with validated options and a clear startup error, the one-line call in Program.cs, and what each check prints when a setting is wrong. .NET 10 C#.
7 min readHow to See the SQL That EF Core Sends to the Database in an ASP.NET Core App (Logging)
Read every SQL statement EF Core runs, straight from an ASP.NET Core app's console: which log category carries it, how to switch it off with one appsettings line, and how EnableSensitiveDataLogging shows parameter values, with the warning it prints and why it never belongs in production. Real output from EF Core 10 and MySQL.
6 min readOracle MySql.EntityFrameworkCore vs Pomelo for EF Core 10: Which MySQL Provider to Use in .NET C#
Two EF Core providers connect .NET C# apps to MySQL: Oracle's MySql.EntityFrameworkCore and the community's Pomelo.EntityFrameworkCore.MySql. Which one supports EF Core 10, their licences, drivers and frameworks, what happened when I tried Pomelo on EF Core 10, and the Oracle quirks I hit while building a real project.
7 min readHow to Check a .NET C# Project for Vulnerable NuGet Packages (dotnet package list --vulnerable)
Find NuGet packages with known security advisories in a .NET C# project: NuGet Audit during restore, dotnet package list --vulnerable for a report, --no-restore when the audit itself blocks restore, and dotnet package update --vulnerable to move to the first safe version. Real output from .NET 10.
7 min readHow to Find and Update Outdated NuGet Packages in .NET C# (dotnet package list --outdated)
See which NuGet packages in a .NET C# project or solution have newer versions with dotnet package list --outdated, include previews only when you mean to, get JSON for scripts, and update with the .NET 10 command dotnet package update. Real output from the .NET 10 SDK.
5 min readHow to Search for NuGet Packages from the Command Line (dotnet package search)
Find NuGet packages without a browser: search by keyword with dotnet package search, list every version of one package with --exact-match, include previews with --prerelease, and get JSON for scripts. Real output from the .NET 10 SDK, used to check which EF Core providers for MySQL support EF Core 10.
5 min readHow to Run an ASP.NET Core App on a Fixed Port (launchSettings.json, --urls and ASPNETCORE_HTTP_PORTS)
dotnet new picks a random port for a new ASP.NET Core project. Set the port you want in launchSettings.json, override it for one run with dotnet run --urls, or use ASPNETCORE_HTTP_PORTS, and see which setting wins, what --no-launch-profile changes, and why the environment became Production. Real output from .NET 10.
7 min readHow to Turn Off a .NET Analyzer Rule for One Folder with .editorconfig
Switch a .NET C# analyzer rule off for one folder only, such as CA1861 in EF Core migrations, with a glob section and dotnet_diagnostic.<rule>.severity = none in .editorconfig. Prove the rule still runs everywhere else, and learn the severity values, the precedence rules and why generated_code is a blunter tool.
7 min read