Records are great.
Until you overuse them.
Why
-
Value-based equality
-
Copy semantics
-
More allocations in loops
Rule
Use records for:
-
DTOs
-
Messages
-
Boundaries
Avoid in:
-
Hot loops
-
Performance-critical paths
Daily micro-tips for C#, SQL, performance, and scalable backend engineering.
Records are great.
Until you overuse them.
Why
Value-based equality
Copy semantics
More allocations in loops
Rule
Use records for:
DTOs
Messages
Boundaries
Avoid in:
Hot loops
Performance-critical paths