Unit Testing with IMongoQueryable
问题 I am using .NET Core 2.0 and the .NET Core MongoDB driver. I have created a repository like so: public interface IRepository<T> { IMongoQueryable<T> Get() } I have done this to give flexibility to whoever uses this to be able to do LINQ much like they would do using EF. The problem is when it comes to unit testing and I'm trying to create an in-memory database so I can check states before and after operation. Some stuff I tried: public class InMemoryRepository : IRepository<ConcreteType> {