Skip to content
0:00 / 0:00

#entityframeworkcore#linq#expressiontrees

Shay Rojansky - How Entity Framework translates LINQ all the way to SQL - Dotnetos Conference 2019

Dotnetos

6.8K subscribers • 3 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Shay Rojansky, Software Engineer at Microsoft

Advanced. Deep dive for people who know the field.

12K views6 years ago2 recommendations

Databases and dataSystems programmingDatabase internalsCompilers and interpretersPerformance and optimization

Shay Rojansky deep dives into Entity Framework Core internals to explain how LINQ expression trees are parsed and translated into SQL.

Visit our website to learn more! conf.dotnetos.org/ Facebook: facebook.com/dotnetos/ Twitter: twitter.com/dotnetosorg Shay is a senior software engineering working in Microsoft's data access team, on Entity Framework Core, the .NET database API (ADO.NET) and other stuff. He is also the lead developer of Npgsql, the .NET open source driver for the PostgreSQL database. Shay is interested in all things performance - low-level and otherwise - and works hard to make .NET shine in various benchmarks. Deep dive into an ORM! .NET ORMs have a particularly complex and thankless job that few people fully understand - to translate user LINQ constructs into SQL; this talk will be a deep dive into Entity Framework's internals which handle this. We'll be discussing IQueryable providers, LINQ expression trees (which can be used to improve perf via code generation), the visitor pattern and the EF's internal architecture, some interesting and non-obvious mismatches between LINQ and SQL and how to overcome them, and some internal as well as user-facing techniques for making EF perform better. We will also focus on some aspects that make the new EF Core different from other ORMs.

Why it's here

2 people recommend this

What people say. Highly recommended as the best resource for understanding the internal query execution and translation workflow of Entity Framework Core.

u/mojothecookin r/dotnet • Recommends

On “Expression trees for LINQ”

…tors to create an SqlExpression, which is also an Expression, but more suitable for translation to SQL. It will run a bunch of pre and post processors optimizing and validating the Expression. Then finally it will walk the SqlExpression to produce generate actual SQL. I personally find this video to be the best so far for visualizing this process: link to this video…

u/mcnamaragioin r/dotnet • Recommends

On “Is there documentation for the query execution workflow in entity framework core 6?”

I think this is one of the best resources directly from EF Core developers: [Shay Rojansky - How Entity Framework translates LINQ all the way to SQL - Dotnetos Conference 2019]