Получить динамический запрос от конечной точки и проанализировать его в BsonDocument/Filter.C#

Место общения программистов C#
Гость
Получить динамический запрос от конечной точки и проанализировать его в BsonDocument/Filter.

Сообщение Гость »


I'm trying to achieve the following:
Let's say I have a GET endpoint where I can send MongoDB query-like filters, something similar to:

Код: Выделить всё

http://localhost:8080/entities?filter={ _id: { $eq: "65ec2f531142aac1738c2203" } }
I want to make this dynamic query with MongoDB where I can receive any kind of query, parse it properly to a .NET format and use with for querying, but I can't find any docs that help me out with that.
Do you have any suggestion?
Thank y'all!


Источник: https://stackoverflow.com/questions/781 ... ent-filter

Вернуться в «C#»