Steve Smith demonstrates how to use the specification pattern to clean up and maintain complex LINQ queries in EF Core applications.
As the complexity of LINQ queries in an app increases, it becomes more difficult to maintain the code. In this week's episode, community MVP Steve Smith visits to show us how to tame your out-of-control LINQ queries using the specification pattern.
Chapters:
Countdown begins
Welcome to On .NET Live
Intro Steve Smith
Overview - Improving Data Access with Abstractions
Using ADO.NET
Code Characteristics (ilities)
Demo
github.com/ardalis/DotNETDataAccessTour
Stored Procedures
Shrink the code with Dapper
Change Tracking with EF Core - Queries
Demo
Abstractions
Demo
IQueryable
Q&A
Calling the Revised Interface Demo
Introduce Specifications
Demo
Sample Repo
github.com/ardalis/specification
Usage
Add Mapping
Demo
Caching - Issue is resolved in the repo
Overall Report Card
Q&A
Resource links
Thank you
.NET Data Access Demos: github.com/ardalis/DotNETDataAccessTour
Sample Repo github.com/ardalis/specification
Featuring: Steve Smith (@ardalis), Scott Addie (@Scott_Addie), Cam Soper
#linq #specifications #dotnet
Why it's here
2 people recommend this
What people say. Recommended for developers looking to abstract EF Core queries and avoid injecting DbContext directly into services.
a
u/apadaxin r/dotnet • Recommends
On “Those of you who are using EF Core and skipping the "Repository" layer by directly injecting dbcontext into you service classes. Are you just rawdogging linq data access code in your service methods, or is linq code abstracted away somehow?”
Steve Smith has a great video that covers this exact scenario link to this video