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…

12

An analogy: Good UIs and Fluent APIs

Background A while back I was writing a web app to try the Entity Framework and MVC together. I knew the pain points would probably be around Foreign Keys, or at least the lack of them in .NET 3.5 SP1 (FKs are now available by default in .NET 4.0). So I started looking for opportunities…

5