我Unable to determine the serialization information for the expression: (PlaceManager pm) => pm.FreePlaces.get_Item(index)在尝试从数据库中删除值时遇到错误(Mongo DB).
这是我的代码:
var result = _placeManager.Update(Query.EQ("_id", 0),
Update<PlaceManager>.Pull(pm => pm.FreePlaces[index], placeId));
Run Code Online (Sandbox Code Playgroud)
这是PlaceManager班级:
public class PlaceManager
{
[BsonId]
public int Id { get; set; }
public int CurrentSize { get; set; }
public Dictionary<int, List<int>> FreePlaces { get; set; }
}
Run Code Online (Sandbox Code Playgroud)