关于[Implementing repository querying interface in EF Core DbContext]的摘要:
My last bold statement was that we don’t need custom unit of work and repository classes with Entity Framework Core. One issue remained unsolved and it was querying part of repositories (yeah, those custom querying methods). After some experiments to get querying interface of repositories to DbContext I worked out something that I kind of like. I managed to make DbContext to work like classic unit of work that hosts repository instances. Here’s my experiment and the solution I worked out.
原文地址: https://gunnarpeipman.com/ef-core-dbcontext-repository/