开发者

How to combine conditional operator in NoRM driver for MongoDB

开发者 https://www.devze.com 2022-12-30 16:07 出处:网络
In mongo native api it is possible to do following: db.collection.find({ \"field\" : { $gt: value1, $lt: value2 } }开发者_Python百科 );// value1 < field < value

In mongo native api it is possible to do following:

db.collection.find({ "field" : { $gt: value1, $lt: value2 } }开发者_Python百科 ); // value1 < field < value

How could I achieve the same with NoRM

Best regards, Dmitry Egorov


Just added this support to the repo, also Adam added LINQ support to do the following..

collection.Find({"field" : Q.GreaterThan(value1).And(Q.GreaterThan(value2))});
0

精彩评论

暂无评论...
验证码 换一张
取 消