我想将MongoDB实例连接到ASP.NET Web API并通过OData服务进行查询 . During my research I found a lot of old and outdated drivers. Also some solutions for node.js. But is there an option to implement it with ASP.NET?

目前我可以通过MongoDB C#驱动程序 Build 与MongoDB的连接 . 我还可以将该集合作为可查询返回,这允许我应用OData过滤器 . 为了实现这一点,必须在每次请求时将集合重新加载到缓存中,因为我正在使用“collection.find(new BsonDocument())”返回整个集合 .

为了提高性能,我需要一种方法来提取OData查询或SQL查询并将其解析为MongoDB语法 .

Is there a package or service that translates the queries mentioned above to a MongoDB-syntax?