无法确定表达式错误的序列化信息

时间:2012-12-06 21:26:07

标签: c# linq mongodb

尝试从数据库(Mongo DB)中删除值时出现Unable to determine the serialization information for the expression: (PlaceManager pm) => pm.FreePlaces.get_Item(index)错误。

这是我的代码:

var result = _placeManager.Update(Query.EQ("_id", 0),
                             Update<PlaceManager>.Pull(pm => pm.FreePlaces[index], placeId));

这里是PlaceManager课程:

public class PlaceManager
{
    [BsonId]
    public int Id { get; set; }

    public int CurrentSize { get; set; }
    public Dictionary<int, List<int>> FreePlaces { get; set; }

}

0 个答案:

没有答案