A nice side effect of using the Result pattern – errors become documentation.
What I'll often do is describe domain errors in a static class.
This class now becomes documentation, describing how a specific aggregate (for example) can cause an error.
Stop trying to force Domain-Driven Design into every feature.
Sometimes, the best architecture is the simplest one: The Transaction Script.
It’s a classic pattern from Martin Fowler, and it fits 80% of CRUD scenarios perfectly.
Instead of building complex aggregates and value objects, you just write a simple, procedural script that handles a single request:
1. 𝗩𝗮𝗹𝗶𝗱𝗮𝘁𝗲 the input data.
2. 𝗖𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗲 the result (business logic).
3. 𝗣𝗲𝗿𝘀𝗶𝘀𝘁 the changes to the database.
4. 𝗥𝗲𝘁𝘂𝗿𝗻 the response.
It is fast, readable, and easy to test.
I wrote an article showing a side-by-side comparison of this vs. a Rich Domain Model.
See the code here: https://t.co/WsqIcpzy7r
👉 When to switch: Start with a Transaction Script. Only refactor to a Domain Model when the business logic becomes "chatty", meaning you have too many if/else blocks or complicated state transitions that are hard to track in a single method.
---
Sign up for the .NET Weekly with 76K+ other engineers, and get a free Clean Architecture template: https://t.co/RB9Rj29qV6
Do you feel like you are falling behind in .NET?
Here are the top 10 articles that will help you catch up:
2025 .NET Development roadmap [Minimalist Edition]
↳ https://t.co/iDksqcHmTE
10 fatal mistakes .NET developers make
↳ https://t.co/6tP2UOiI4D
MediatR? Not in my .NET stack
↳ https://t.co/WdWmAv10jN
Zero Azure cloud experience? Start here
↳ https://t.co/ylgMkONBSk
Modular monolith: The 1 architectural pattern most devs ignore
↳ https://t.co/6JFd1PMLvl
How to beat uncertainty when designing systems
↳ https://t.co/0RCRLs3JFq
7 powerful LINQ methods you’ll wish you knew sooner
↳ https://t.co/58B7tRBsHB
Throwing exceptions kills apps. Here's how to fix that.
↳ https://t.co/gX9fVM93PB
How I push unfinished work to production (and why you might too)
↳ https://t.co/t3f7FZTNVs
4 proven ways how tests reveal awful code
↳ https://t.co/WFmDUaUeBw
♻️ Follow me and repost this to help others.
P.S. Join 11,000+ developers who read my free newsletter to improve your .NET skills and progress your career:
https://t.co/FKvRBskrGL
What is RBAC (Role-Based Access Control)?
Here's how it can help with your authorization policies.
RBAC stands for Role-Based Access Control.
Here's how RBAC works:
- Roles are assigned a set of permissions
- Users are granted roles, and thus permissions
- Permissions decide what a user can or can't do
What's the benefit?
One problem I always had with roles was fine-grained authorization rules.
Roles are too broad for some policies I need to enforce.
This is where permissions come in.
I can define permissions for specific actions.
It's easy to allow other roles to access that action: I have to assign the permission to the role.
It's not a complicated idea. But it's a powerful authorization approach.
If you want to learn more about permission authorization and how you can use claims transformation to implement it, check out this article: https://t.co/Bq3vnkCMil
Have you used RBAC in your applications?
---
Do you want to simplify your development process? Grab my free Clean Architecture template here: https://t.co/j8Z77G1HKN
STUDY HARD. No matter if it seems impossible. No matter if it takes time. Wake up early and start studying for your future. Just remember that the feeling of success is the best feeling in the world.
PLS RT ⚠️ ABDUCTION OF 2 ACTIVISTS IN BROAD DAYLIGHT CAUGHT IN CCTV
On Aug. 28, men aboard a Toyota van abducted Felix Salaveria Jr. while he while was walking home in Brgy. Cobo, Tabaco City, Albay.
PLATE # VAA5504
#StopTheAttacks!