0
kicks
Another C# trick: Fluents, Inheritance and Extension Methods
Here’s a scenario which Damien and I encountered recently.
We needed a way of specifying Facets for properties on Entities, i.e. things like Nullable, MaxLength, Precision etc.
And we needed a class hierarchy because different types of properties have different sets of available facets.
The base class of the hierarchy is called PropertyConfiguration which defines a series of Fluent methods that are shared by all sub types: