Regira Engineering Blog

Notes on .NET, TypeScript & Vue

Patterns, gotchas and small wins from fifteen-odd years of .NET and web work — the Regira packages and modules, entity pipelines, editorial front-ends and everything between.

5 articles #hierarchies ×
TypeScript / Vue

The API Sends a List, the Screen Needs a Tree

Series · Hierarchical data

Show the flat list an API returns as a tree users can expand, select and drag to a new parent. No recursive component, and illegal drops are refused in the browser before they reach the server.

8 min read
Data & EF Core / Architecture

How to Query Hierarchies at Any Depth with EF Core

Series · Hierarchical data

Answer 'everything under X' for category trees, org charts and folders, at any depth. Three approaches, from one that works on any database to one that scales to millions of rows, and how to pick.

Pinned 17 min read
.NET / Tips & Tricks

From a Flat List to a Tree in One Line of C#

Series · Hierarchical data

A quick look at turning a flat collection with parent references into a navigable hierarchy, without writing recursion yourself.

5 min read
.NET / Architecture

The Realm at Any Date

Series · People, organisations and alliances

Answer who reported to whom on any past date from the data you already store, with no history tables and no migrations. One dated relationship table and a single filter do it; Westeros supplies three centuries of test data.

17 min read
.NET / Data & EF Core / Architecture

Westeros, the Iron Throne, and a Model for Complex Relationships

Series · People, organisations and alliances

One table for every customer, supplier and employee, with roles and alliances as dated relationships instead of extra tables. Tested on Westeros, where everyone knows who betrayed whom and when.

Pinned 14 min read