Unit testing with queries defined in extension methods

后端 未结 8 741
执笔经年
执笔经年 2020-12-23 02:16

In my project I am using the following approach to querying data from the database:

  1. Use a generic repository that can return any type and is not bound to one t
8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 03:01

    I see your IRepository as a "UnitOfWork" and your IQueries as a "Repository" (Maybe a fluent repository!). So, simply follow the UnitOfWork and Repository pattern. This is a good practice for EF but you can easily implement your own.

提交回复
热议问题