Sébastien Rigaux

Tech watch

← All links

Software Architecture

Organizing components, dependencies and responsibilities within software systems.

Banner reading “Multi-Tenant .NET, Part 4: Moving Day,” with moving boxes, a guild emblem, and an illustrated portrait.

This installment explains how to move a tenant from a shared database to a dedicated one without taking the application offline or disrupting other tenants. The catalog drives the switch, while the same EF Core model and query filter serve both isolation modes.

The migration uses an initial copy, a temporary read-only window, a delta copy, and verification before cutover. The runbook waits for the cache to expire before reopening writes, preventing instances that still hold the old connection from writing to the shared database after the switch.

BarretFound via C# Digest

A hand handles colorful network cables in front of rack-mounted equipment.

With one database per tenant, EF Core no longer needs a global query filter, a TenantId column, or a tenant-specific model cache key: the tenant is selected through a connection string resolved from a catalog database.

This isolation simplifies the model but shifts complexity to operations: each migration must be applied to every database. The article also explains how IDesignTimeDbContextFactory lets dotnet ef create the context without an active request or tenant.

BarretFound via C# Digest

Graphic titled “Multi-Tenant .NET, Part 2 — Shared Database with Schema Separation,” showing a “House for Rent” sign, a circular emblem with two swords, and an illustrated portrait.

Part 2/4 shows how to isolate each tenant’s data in its own SQL Server schema, without a global query filter or a required TenantId column. EF Core can use a simple primary key again, while the database structure itself enforces the isolation boundary.

The key change is model caching: OnModelCreating runs only once per model. The schema must be included in the cache key through IModelCacheKeyFactory, or EF Core may reuse the first tenant’s schema. The article also covers per-schema provisioning and migrations, plus strict validation of schema names interpolated into SQL.

BarretFound via C# Digest

Article banner showing its title, Ricardo Groß’s name, and the date “Jun 11” on a white background.

CodoMetis.ValueRanges offers .NET range types to replace pairs of dates and their scattered logic. Its five variants—finite, unbounded on either side, infinite, and empty—make possible shapes and rules explicit, while operations such as Contains and Overlaps run in memory.

The companion EF Core package bridges the domain model to PostgreSQL: the same operations are translated into SQL operators through Npgsql. The article also explains the design trade-off: abstract records rather than structs, so each variant can be represented by a type hierarchy.

@Found via C# Digest

Metalama automates cross-cutting C# patterns with aspects that generate code at compile time, while checking architecture rules as you edit. The repetitive implementation stays out of business code and the repository, and one aspect can be applied to a method or to a set of methods selected in code.

For example, an aspect can wrap a method in try/catch to log its entry, result, and exceptions. Metalama also lets you preview and debug the transformed code, making those changes inspectable.

Found via C# Digest

Screenshot of the REA repository on GitHub

REA offers a unified approach to reverse engineering, driven by agents that can analyze native binaries, JavaScript/Electron apps, websites, or databases without source code access. The tool integrates with agents like Claude Code or Cursor, provides evidence and limitations for each analysis, and leverages native tools (Hopper, Ghidra, IDA) for deep inspection. The documentation details supported scenarios, provider setup, and CLI workflows, with concrete examples of feature-level reverse engineering from real applications.

morluto

Header illustration for the React folder structure article on Robin Wieruch’s site

This comprehensive overview walks through organizing a React project, from a single file to a modular monorepo structure. The author details how to split code (files, technical folders, feature folders, domains, packages) and the impact of each approach on maintainability, dependency isolation, and scalability. Concrete examples illustrate how to evolve the architecture as the project grows, with clear rules to prevent cross-feature dependencies and encourage reuse.

Robin Wieruch