Multi-tenant REST with Trysil.Http
SaaS applications almost always need multi-tenancy, and “one database per tenant” is the shape that keeps the promise easiest to state: each customer’s data lives in its own database, with no tenan...
SaaS applications almost always need multi-tenancy, and “one database per tenant” is the shape that keeps the promise easiest to state: each customer’s data lives in its own database, with no tenan...
This post starts a four-post mini-series on Trysil.Http - the REST module that wraps the ORM in a conventional HTTP API layer. The pattern is deliberate: you write entities, you attach attribute-a...
This post is about the Trysil.JSon module: turning entities into JSON, parsing JSON back into entities, and the one record that decides how much of the graph goes along. The module exists because ...
Last post looked at TTSession<T>, the unit-of-work layer: you hand it a list, work on clones, and mark each one with Insert, Update or Delete. This post is about the other way to write a batc...
Back in Why Trysil uses full-clone in TTSession, we argued why TTSession<T> clones every entity on entry and drives state with explicit API calls. That post was about the why. This one is abo...
Trysil 2.0.0 is out. The changelog is long, and it opens with a sentence that is not the usual release-note tone: This section carries twenty-two compilation breaks and eighty-four breaks the c...
Here’s a pattern that shows up in almost every ORM-backed codebase, written by people who don’t realize it: LOrder := LContext.Get<TOrder>(42); // ... do something ... LOtherOrder := LContex...
A TOrder has a CustomerID. Sometimes, when the code holds an order, it also needs the Customer. Sometimes it doesn’t. A naïve ORM fetches the customer eagerly on every Get<TOrder>. That’s si...
Two users open the same invoice. Alice edits the amount and clicks Save. Bob, a minute later, edits the customer and clicks Save. Alice’s amount is gone. Bob overwrote it with the value he loaded a...
The previous post ended with a promise: after hooks exist, we’ll come back to them. This is that post. Trysil has two complementary mechanisms for reacting to persistence operations. One is the me...