Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Class Diagrams 1: Classes, Attributes, Operations, Visibility, Multiplicity and Stereotypes
Every marker in a class diagram is a decision in code: [0..1] is a nullable type, [0..*] a collection, a slash a computed property, an underlined line a static member, and {readOnly} a field that never changes. The three compartments of a class box, attribute and operation syntax, the corners where visibility does not match C#, interfaces, enumerations, data types and stereotypes, and the same diagram in Mermaid.
Class Diagrams 2: Association, Aggregation, Composition, Generalization and Dependency — with C# Equivalents
An association is a lasting link and becomes a navigation property in C#; in a composition the part has one owner and is deleted with it, which in EF Core means an owned or complex type or cascade delete; aggregation has no precise meaning in UML 2.5.1. The notation and C# counterpart of six relationships, EF Core's cascade default on required relationships, qualified associations, and why Approval is promoted from an association class to a class of its own.