I'm getting an Unable to determine the serialization information for the expression: (PlaceManager pm) => pm.FreePlaces.get_Item(index)
error when trying to remove value from database (Mongo DB).
Here's my code:
var result = _placeManager.Update(Query.EQ("_id", 0),
Update<PlaceManager>.Pull(pm => pm.FreePlaces[index], placeId));
And here's PlaceManager
class:
public class PlaceManager
{
[BsonId]
public int Id { get; set; }
public int CurrentSize { get; set; }
public Dictionary<int, List<int>> FreePlaces { get; set; }
}
Copyright Notice:Content Author:「Yury Pogrebnyak」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/13752901/unable-to-determine-the-serialization-information-for-the-expression-error