I am using .net core 2.1 class library, and MongoDB.Driver.dll Version 1.7.0.4714 I have prepared a query in mongodb shell, and it is working fine.