Перейти к содержимому

One LINQ Extension Method You NEED To Know For Cleaner EF Core Queries

Milan Jovanović

0:00 / 0:00

One LINQ Extension Method You NEED To Know For Cleaner EF Core Queries

27 499 просмотров · 3 г. назад
Milan Jovanović
169 тыс. подписчиков
27 499 просмотров · 3 г. назад
☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code:   / milanjovanovic   EF Core is the most popular ORM among .NET developers, and rightfully so. It's common to write LINQ queries with EF Core to execute SQL queries on the database. LINQ can sometimes become verbose when you need to write complex conditional statements. So here's a useful LINQ extension method that will make your EF Core queries cleaner. Join my weekly .NET newsletter: https://www.milanjovanovic.tech Read my Blog here: https://www.milanjovanovic.tech/blog Subscribe for more:    / @milanjovanovictech   Chapters 0:00 Setting the scene 1:04 Filtering data with EF Core 2:33 Conditional filtering in LINQ Where statement 5:22 Implementing the WhereIf extension method 7:48 Using the WhereIf method in a LINQ query