The new C# driver is totally Async and in my understanding twists a little bit the old design patterns such as DAL in n-tier architecture.
In my Mongo DALs I use to do:<
In my case: When I got this error:
The source IQueryable doesn't implement IAsyncEnumerable. Only sources that implement IAsyncEnumerable can be used for Entity Framework asynchronous operations.
I have implemented the async where function for mongodb as follows.
public async Task> Where(Expression> expression = null)
{
return await context.GetCollection(typeof(TEntity).Name, expression).Result.ToListAsync();
}