0
看看documentation,我知道我可以使用$ push命令與$ each和$ position修飾符一起在數組的開始處添加en元素。
如何使用MonogoDB C#驅動程序創建此命令?
更清楚,我想執行這個查詢(從官方文檔拍攝):
db.students.update(
{ _id: 1 },
{
$push: {
scores: {
$each: [ 50, 60, 70 ],
$position: 0
}
}
}
)
您可能要添加的確切MongoDB的查詢你」重新嘗試映射到C#驅動程序。 –