Skip to content
kc@kumarChandrachooda.com:~$ cd /blog/archive && read --section="top" 0%
Archive

Every article

Newest first, grouped by year. Search or filter by topic.

  • 556 articles
  • 334 matching
.NET 10 May 2025

One Query Across Every Version

A point lookup that might hit any of three tables, a list query that should span them all, and writes that must keep a registry honest - this part walks VersionKit's version-aware reader and writer, and the generated UNION view that makes every schema era queryable as if it were current. Part 8 of the Entity Versioning with VersionKit series.

.NET 09 May 2025

Give Old Rows Their Own Table

JSON payloads can migrate lazily because the reader controls the shape - relational rows cannot, because the table is the shape. VersionKit's EF Core answer is table-per-version - archive Orders as Orders_v2 on a schema bump, track every row's home in a registry, and let old rows stay old until something moves them. Part 7 of the Entity Versioning with VersionKit series.

.NET 09 May 2025

Paying Down the Migration Debt

Lazy migration makes deploys instant but taxes every read of old data. VersionKit's backfill service rewrites stale payloads in scheduled batches until the store converges on the current version - in a host, or from a serverless function. Part 6 of the Entity Versioning with VersionKit series.

.NET 08 May 2025

When Attributes Aren't Enough

Splitting a name field, converting a string to a bool, deriving a flag from a total - some migrations are code, not metadata. This part covers VersionKit's three escape hatches and the sharp edges each one carries. Part 5 of the Entity Versioning with VersionKit series.

.NET 07 May 2025

Nobody Writes an Up() Method

At startup VersionKit reflects over your model assembly and compiles property attributes into an executable pipeline - one migration step per version pair, five operation types, all of them deliberately idempotent. Part 3 of the Entity Versioning with VersionKit series.

.NET 07 May 2025

The Watermark and the Walk

Every stored payload carries a __version stamp; every read walks it up one step at a time. This part dissects VersionKit's lazy migration pipeline - the MigrationRunner API, the JsonElement traps System.Text.Json sets for dictionary code, and reading history on purpose. Part 4 of the Entity Versioning with VersionKit series.

.NET 06 May 2025

Five Ways a Property Can Change

Rename, move, add, remove, type change - VersionKit's attribute surface covers five kinds of schema evolution. This part walks the whole declarative API, the merge rules behind stacked attributes, and what the attributes deliberately refuse to express. Part 2 of the Entity Versioning with VersionKit series.

.NET 05 May 2025

Multi-Tenancy Retrospective: What I'd Do Differently

Nine parts of architecture posts lie by omission unless the tenth is the ledger. What earned its keep — isolation as data, MaxTenants = 1, the schema-keyed model cache — and the honest list of shortcuts: plaintext connection strings, cache windows, reflection, and a fan-out loop that still says TODO.

.NET 05 May 2025

Your Database Remembers What Your Code Forgot

Rename a property, change a type, ship the release - and every payload you stored last year stops deserialising. Introducing VersionKit, a .NET library that declares schema history as attributes and migrates old data on read.

.NET 04 May 2025

The PostgreSQL Payoff: ltree Hierarchies and jsonb Payloads

Seven parts of migration machinery existed to deliver one table — a hierarchical crumb trail with three ltree columns, a jsonb payload, GiST and GIN indexes, and a Dapper read side that speaks PostgreSQL's native operators. This is why it was PostgreSQL all along.

.NET 03 May 2025

Rolling Out Migrations Across a Tenant Fleet

Shipping a migration to one database is a deploy step. Shipping it to every schema in every group database is an orchestration problem — cross-database MigrateAsync, an HTTP migration surface, a per-tenant audit ledger, and the honest gap where the fan-out loop should be.

.NET 02 May 2025

A Control Plane Needs Its Own Domain Model

Tenants are data too. The tenant-management database is the one single-tenant database in the whole platform, and its five entities — Tenant, TenantConnection, TenantFeature, DatabaseGroup, TenantMigrationHistory — carry every decision the rest of the series depends on.

.NET 02 May 2025

Tenant Offboarding: Soft Delete, Purge and Restore

Deleting a tenant is the most dangerous button in the platform — behind it sit DROP SCHEMA CASCADE and DROP DATABASE. A two-step lifecycle with global query filters, a SaveChanges interception and an explicit purge keeps the blast radius survivable.

.NET 01 May 2025

Provisioning Tenants at Runtime

A signup click becomes a real PostgreSQL database or schema in seconds. Running CREATE DATABASE from application code feels illegal until you contain it — identifier validation, quoted DDL, idempotent steps, and a status machine that admits when provisioning fails.

.NET 30 Apr 2025

Making EF Core Migrations Schema-Aware

EF Core wants one database, one model and one migrations history table. Schema-per-tenant breaks all three assumptions. Constructor-injected migrations, a per-schema history table and a replaced IMigrationsAssembly put one migration set in charge of every tenant schema.

.NET 30 Apr 2025

The Model-Cache Trap: Why Only One Tenant Migrates

You built schema-aware migrations, provisioned tenant A, and everything worked. Tenant B provisions without a single error — and gets no tables. EF Core's model cache is the silent culprit, and IModelCacheKeyFactory is the three-field fix.

.NET 29 Apr 2025

Resolving the Tenant on Every Request

Header, route, subdomain or query string: how the platform decides who is asking before it touches any data, how tenant identity becomes a connection string and a schema, and where the caching knives are hidden.

Azure & DevOps 28 Apr 2025

Deploying ASP.NET Core to Azure App Service with GitHub Actions

A practical walkthrough of the pipeline that ships this very website: from push to production on Azure App Service, with secrets kept out of the repository and zero manual steps.

.NET 28 Apr 2025

Three Ways to Isolate a Tenant in .NET and PostgreSQL

Database-per-tenant, schema-per-tenant, or packed into a shared database? Kicking off a series on building a multi-tenant platform where one EF Core codebase supports all three isolation strategies behind a single control plane.

Architecture 27 Apr 2025

From Monolith to Microservices on AKS: A Field Guide

Lessons from migrating a multi-tier .NET Framework monolith to .NET microservices on Azure Kubernetes Service: what to split first, what to leave alone, and the manifests that hold it together.

.NET 26 Apr 2025

Getting Transactions Right with EF Core

SaveChanges is already a transaction, until it isn't enough. A tour of explicit transactions, TransactionScope, execution strategies and the failure modes that only show up in production.

.NET 22 Apr 2025

CI Theatre and a NuGet Feed Made of Folders

Four pipelines run dotnet test against projects with no tests and pass every time, the shared model ships as committed .nupkg files in a folder, one executable has no pipeline at all, and a DLL with no source hides an algorithm pasted inline elsewhere.

.NET 18 Apr 2025

An Attendance System Plays Timezone Roulette

UTC timers, IST badge gates, DateTime.Now in one executable and UtcNow in the next, columns that record neither - how a system whose entire product is timestamps got away with never deciding what time it is.

.NET 17 Apr 2025

Nagging by Timer — the Ten-Hour Swipe-Out Email

Every five minutes a function hunts for people still virtually swiped in past ten hours and emails them - magic node numbers, an at-most-once flag with a gap in it, and a local config file pointing straight at production.

.NET 17 Apr 2025

The Error Logger That Cannot Log

A 22-character job name, a 20-character column, and an error handler that has thrown on every attempt since the day it shipped - plus the four parallel logging systems that still could not catch it.