EFNext

Source generator that enables modern C# syntax in LINQ expression trees

15
0
100% credibility
Found Mar 30, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
C#
AI Summary

ExpressiveSharp lets everyday coders use modern C# shortcuts like safe navigation and pattern matching directly in database queries by generating compatible expression trees at compile time.

How It Works

1
🔍 Hit query roadblocks

You're pulling data from a database but can't use simple modern shortcuts like safe checks or quick decisions.

2
📦 Grab the helper

Add a free tool to your project that understands everyday coding tricks.

3
Tag your calculations

Mark formulas for totals or categories with a simple note so the tool knows to expand them.

4
💻 Write natural queries

Use question marks for safe access and switches for choices right in your data pulls.

5
See smart results

Run your code and watch it turn into efficient database instructions automatically.

🚀 Queries feel magical

Enjoy clean, fast data fetching that works just like your regular code, every time.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 15 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is ExpressiveSharp?

ExpressiveSharp is a C# source generator that lets you use modern syntax like null-conditional operators, switch expressions, and pattern matching directly in LINQ expression trees. Normally, expression trees reject these features, forcing ugly workarounds like nested ternaries, and computed properties don't translate to SQL in EF Core queries. Mark members with an attribute, and it generates compatible trees at compile time, enabling clean code that providers like EF Core can turn into efficient SQL.

Why is it gaining traction?

It stands out by supporting a wide range of C# features—tuples, string interpolation, collection expressions—without runtime overhead, unlike runtime expression parsers. EF Core integration auto-expands computed properties and applies SQL-friendly transformers, plus experimental window functions like ROW_NUMBER. Developers love ditching duplicated inline logic for reusable, expressive members that just work in queries.

Who should use this?

EF Core users building complex queries with computed fields or optional navigation properties, like order totals or customer grades. LINQ-heavy apps needing pattern matching or block bodies without client evaluation. C# teams on .NET 8+ targeting relational DBs who want readable queries over verbose ternaries.

Verdict

Grab it if EF Core expression limits frustrate you—docs are solid, benchmarks prove negligible overhead, and samples run out of the box. With 15 stars and 1.0% credibility, it's early but mature enough for non-prod; watch for wider adoption as C# evolves.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.