Gunnar Peipman 2/3/2020

Implementing repository querying interface in EF Core DbContext

Read Original

This article explores a solution for adding custom querying methods to an EF Core DbContext, aiming to mimic a repository pattern's querying interface without creating separate repository classes. It discusses the limitations of extending DbSet<T>, the drawbacks of extension methods, and proposes an approach to inject querying interfaces into the DbContext to maintain testability and avoid class bloat.

Implementing repository querying interface in EF Core DbContext

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week