2026
Every post published in 2026, newest first. Pick a month to narrow it down.
- Posts
- 1,054
- Topics
- 114
- Reading time
- 128 h
- Active months
- 6
Posts 691–720 of 1,054 · November 3, 2026
Page 24 of 36
November 2026
802 postsTuesday, November 3, 2026
30 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 readHow to Enforce .NET C# Code Style Rules on Build with EnforceCodeStyleInBuild
Code-style rules in .editorconfig (IDE0044 and the other IDExxxx rules) are skipped by dotnet build until you set EnforceCodeStyleInBuild. See the same code build clean, then fail on IDE0044, then pass after the fix, and learn which settings decide what the build reports. Real output from the .NET 10 SDK.
7 min readHow to Add an .editorconfig to a .NET C# Project with dotnet new editorconfig
Create the default .NET .editorconfig with dotnet new editorconfig, read its sections and its option = value:severity entries, know which rules it sets to warning, and use --empty when you want to start from nothing. Real output from the .NET 10 SDK, and why the build ignores most of it until you turn on code-style enforcement.
6 min readHow to Turn On More .NET C# Code Analysis Rules with AnalysisLevel (latest-recommended and latest-all)
.NET analyzers are on by default, but only a few rules warn. Set AnalysisLevel to latest-recommended or latest-all to make the build report more code-quality issues, see what changes on a real project (CA1852, CA5394), and decide how strict to go. Real output from the .NET 10 SDK.
7 min readHow to Treat Warnings as Errors in .NET C# Projects (TreatWarningsAsErrors)
Make dotnet build fail on warnings with TreatWarningsAsErrors, keep chosen warnings as warnings with WarningsNotAsErrors, turn only some warnings into errors with WarningsAsErrors, and silence one with NoWarn. What it does to NuGet warnings such as NU1903, with real output from the .NET 10 SDK.
7 min readHow to Share Build Settings Across .NET C# Projects with Directory.Build.props
Set an MSBuild property once for every project in a .NET C# solution with Directory.Build.props: create it with dotnet new buildprops, check that each project picks it up with dotnet msbuild -getProperty, override it in one project, and avoid the nested-file trap with --inherit. Real output from the .NET 10 SDK.
7 min readHow to Upgrade a Transitive NuGet Package with Central Package Management (Transitive Pinning)
A package you reference pulls in an older version of another package, such as MySql.EntityFrameworkCore bringing EF Core 10.0.12 when 10.0.14 is out. See it with dotnet package list --include-transitive, raise it with CentralPackageTransitivePinningEnabled in Directory.Packages.props, and know the NU1109 rule for downgrades.
6 min readHow to Use Central Package Management for NuGet in a .NET C# Solution (Directory.Packages.props)
Keep every NuGet package version of a .NET C# solution in one file with Central Package Management: create Directory.Packages.props with dotnet new packagesprops, move existing versions out of the .csproj files, add and update packages from the CLI, and override one version for one project with VersionOverride. Real output from the .NET 10 SDK.
6 min readHow to Add, Update and Remove a NuGet Package with the .NET CLI (dotnet package add)
Add a NuGet package to a .NET C# project with dotnet package add, pin a specific version, list what's installed, try a prerelease, and remove it again. What each command writes into the .csproj, how it works with Central Package Management, and the older dotnet add package form. Real output from the .NET 10 SDK.
8 min readHow to Add a Project Reference in .NET C# with the CLI
Let one .NET C# project use the code of another: dotnet reference add writes the ProjectReference into the .csproj, dotnet reference list shows it, and dotnet reference remove takes it out. What the reference does at build time, the CS0246 error without it, and the older dotnet add reference form.
7 min readHow to Create and Manage a .slnx Solution File with the .NET CLI
Create a .NET 10 C# solution in the new .slnx XML format with dotnet new sln, add projects with and without solution folders, list them, keep the old .sln format when you need it, and convert an existing .sln with dotnet sln migrate. Real output from the .NET 10 SDK.
7 min readHow to Revert an Applied EF Core Migration
Roll a database back to an earlier EF Core migration with dotnet ef database update <migration>, see the Down method run and the history row disappear, revert everything with 0, and know why a Down method can fail and lose data. Real output from EF Core 10 on MySQL 9.7.
6 min readHow to Remove the Last EF Core Migration
Undo dotnet ef migrations add with dotnet ef migrations remove: what it deletes and restores, the error when the migration is already applied, how to revert first, and --force, which does both in one step. Real output from EF Core 10 with MySQL 9.7, plus when removing is the wrong move.
7 min readHow to Check for Pending Model Changes in EF Core
Find out whether your EF Core model has changed since the last migration, before you forget to create one: dotnet ef migrations has-pending-model-changes, its exit code for build scripts, what it compares, and how it proves a refactor changed nothing. Real output from EF Core 10 in a .NET C# solution.
6 min readHow to List EF Core Migrations and See Which Ones Are Applied
List every EF Core migration in your project and see which ones the database has applied with dotnet ef migrations list, read the (Pending) marker, get JSON for scripts, list without a database, and look at the __EFMigrationsHistory table EF Core keeps in MySQL. Real output from EF Core 10 and MySQL 9.7.
6 min readHow to Generate a SQL Script from EF Core Migrations
Turn EF Core migrations into a SQL script you can read, review and hand to whoever runs the database: all migrations, only the ones after a given migration, a range, a rollback script, and a file with --output. Real scripts from EF Core 10 for MySQL 9.7, including what the provider leaves out.
8 min readHow to Use EF Core Migrations When the DbContext Is in a Class Library
When your DbContext lives in a class library and the app in a separate .NET C# Web API project, every dotnet ef command needs two options: --project for the library and --startup-project for the app. See what each one means, the three errors you get when one is wrong, and the command that works. EF Core 10.
7 min readHow to Use ConfigureConventions in EF Core to Configure Every Property of a Type
Set a rule once for every decimal, DateTime or enum in your EF Core model with ConfigureConventions: precision for money, a UTC converter for dates, strings for enums. See each rule leave the model unchanged when it replaces per-property code, and see a per-property setting override it. EF Core 10 with MySQL.
7 min readHow to Configure a One-to-Many Relationship in EF Core
One category has many products: model it in C# with a foreign key and two navigation properties, see how EF Core discovers it by convention (foreign key, index and delete rule in MySQL), then configure it explicitly with HasOne, WithMany and HasForeignKey. Real migrations from EF Core 10 on MySQL 9.7.
6 min readHow to Make EF Core Columns Required or Nullable with C# Nullable Reference Types
With nullable reference types, EF Core reads your C# types to decide which MySQL columns may be NULL: string? is optional, string is required. See it in a real migration, use C#'s required modifier so the compiler enforces it too, and change an existing column from nullable to required safely. EF Core 10, .NET 10 and MySQL 9.7.
8 min read