首页 新闻 赞助 找找看

MongoDB C# 驱动怎么实现给内嵌数组的内嵌数字追加。比如博客的评论数组,每个评论又有点赞数组

0
悬赏园豆:5 [已关闭问题] 关闭于 2015-10-04 14:49

class blog

{

     list<string> Comment;//评论数组

}

class Comment

{

list<string> likes;//点赞数组

}

我只知道怎么追加评论

_posts.Collection.Update(Query.EQ("_id", postId),
        Update.PushWrapped("Comments", comment).Inc("TotalComments", 1));
但是每个评论的点赞怎么做呢
大芝麻的主页 大芝麻 | 初学一级 | 园豆:4
提问于:2015-09-24 10:50
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册