Wiring
Page 2 of 8 · Today

Today every new feature edits three shared files by hand

The service list, the table list and the table details all sit in shared files; 25 of 64 pull requests touched them.

Registered by hand

Three lists name every feature, and each new feature edits them

A DbContext is the class from Entity Framework (EF) that knows every table of the app. alcohol.zinc has exactly one, MainDbContext.

Three things are listed by hand today, at commit 9fc729e:

Where a new feature is registered by hand
WhatFileLines
ServicesApp/Modules/DomainServices.csall 248
Tables (DbSet list)App/StartUp/Database/MainDbContext.cs36 to 77
Table details (indexes, links)App/StartUp/Database/MainDbContext.cs89 to 341
Background jobsApp/StartUp/Server.cs157 to 162

This is read from the code From code. The before and after page walks through these lines.

  • DomainServices.cs makes 67 service registrations, one by one, and imports 51 namespaces.
  • MainDbContext.cs imports 21 module namespaces and lists 33 tables.
  • Controllers and validators are already found by ASP.NET itself, and mappers are static helpers, so they need no list.
How often

25 of 64 pull requests edited a shared file, but only 2 merges clashed on one

The git history from June 2025 to November 2026 holds 64 merged pull requests. This chart counts the pull requests that changed each shared file:

Pull requests that changed each shared file
The snapshot
21 pull requests
MainDbContext.cs
19 pull requests
DomainServices.cs
17 pull requests
Server.cs
9 pull requests
Any of the four
25 pull requests
Show as table
pull requests
The snapshot21
MainDbContext.cs19
DomainServices.cs17
Server.cs9
Any of the four25

git history, measured

So about 4 in 10 pull requests touched at least one of them Measured.

All 94 merge commits were replayed with git merge-tree; 6 had conflicts. The service list and the table list caused one conflict each:

Merges that conflicted, by file
HttpClients.cs (a name list)
3 merges
Settings files
2 merges
DomainServices.cs
1 merge
MainDbContext.cs
1 merge
The snapshot
0 merges
Show as table
merges
HttpClients.cs (a name list)3
Settings files2
DomainServices.cs1
MainDbContext.cs1
The snapshot0

94 merges replayed, measured

Pull requests that were rebased instead of merged leave no merge commit, so this undercounts Measured.

Migrations

A migration is made on a laptop and applied by a separate program at deploy

A migration is written by EF when you run dotnet ef migrations add, and EF rewrites the snapshot at the same time. A migration bundle is a small program that only applies migrations.

The life of one migration, from the laptop to production:

  1. Create
    A developer runs task migration:create. EF writes 2 new files (the migration and its Designer copy) and rewrites the snapshot.
  2. Deploy
    CI builds a separate image that runs a migration bundle; a Kubernetes Job runs it before the app.
  3. Local
    On a developer cluster with AutoMigrate on, the app migrates itself at start.
  4. CI
    Nothing migrates a real database: the tests build their tables straight from the model. One test runs real migrations.

This is read from the code and the Taskfile From code. Today there are 15 migrations, which make 31 files, and the Designer files alone are 17,046 lines Measured.