如何使用C#mongodb驱动程序2.0版在$ in运算符中使用? [英] How do I use in $in operator using the 2.0 version of the C# mongodb driver?
本文介绍了如何使用C#mongodb驱动程序2.0版在$ in运算符中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在以前的mongodb c#驱动程序中,我找到了很多如何使用$ in的示例,但是在2.0版本中找不到有关如何使用$ in的示例.
I found a lot of examples of how do use $in in the previous mongodb c# driver, but I can not find any examples on how to do it in the 2.0 version.
推荐答案
对键入的版本使用AnyIn
运算符:
Use the AnyIn
operator for the typed version:
Builders<TDocument>.Filter.AnyIn(x => x.Array,searchArray)
这篇关于如何使用C#mongodb驱动程序2.0版在$ in运算符中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文