ExpressiveSharp: Projectables, reimagined

Back in 2021 I wrote about a new library called EntityFrameworkCore.Projectables. The idea was simple: mark a property or method with [Projectable], let a source generator produce a companion expression tree for it, and EF Core can suddenly translate your computed properties to SQL. No more duplicating logic, no more over-fetching.

A lot has happened since then. Projectables grew support for block-bodied methods, switch expressions, pattern matching, constructors and more. A big shout-out goes to Fabien Ménager here, who is behind most of those features, along with a docs website, code fixes and a whole lot of performance work. But every one of those features had to fight the same wall, and at some point I had to admit that the wall was not going anywhere. So I started over. Today I want to introduce ExpressiveSharp, a reimagined Projectables that is, well, just done better. Let’s dive in and see what changed and, more importantly, why.

[Read More]