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

Опубликовано: 17 Февраль 2023
на канале: Milan Jovanović
21,644
1.2k

☄️ 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


Смотрите видео One LINQ Extension Method You NEED To Know For Cleaner EF Core Queries онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Milan Jovanović 17 Февраль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 21,644 раз и оно понравилось 1.2 тысяч людям.