IDbAsyncEnumerable not implemented

前端 未结 7 800
清歌不尽
清歌不尽 2020-12-01 10:50

I am trying to make a FakeDbContext with a FakeDbSet for unit testing.

But I get the following error (see below). I am extending DbSet so normally IDbAsyncEnumerable

7条回答
  •  悲&欢浪女
    2020-12-01 11:02

    In my case the exception was caused by using the wrong ToListAsync extension.

    It came from:

    using System.Data.Entity;
    

    instead of

    using Microsoft.EntityFrameworkCore;
    

    Changing the namespace fixed the error.

提交回复
热议问题