Skip to content
0:00 / 0:00

#specificationpattern#linq#efcore

On .NET Live - Taming LINQ Proliferation with Specifications

dotnet

357K subscribers • 45 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

6.7K views2 years ago2 recommendations

Software designDatabases and dataDesign patternsSoftware architectureC# and .NET

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.

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

u/Ankndin r/dotnet • Recommends

On “Returning IQueryable<T> from service layer”

Check out this newest spec pattern presented by Microsoft mvp, exactly to your4case. link to this video