Mock AsNoTracking Entity Framework

前端 未结 3 820
傲寒
傲寒 2020-12-05 18:18

How do I mock AsNoTracking method?
In below example, DbContext has injected to the service class.It works fine if I remove AsNoTracking extension method from GetOrderedP

3条回答
  •  不思量自难忘°
    2020-12-05 18:41

    you can use Entity Framework Effort to mock the AsNoTracking(), also you can mock the Db Transactions and Entity State by using Effort - Official site for Effort

提交回复
热议问题