Cannot determine serialization information for expression error

I get an error Unable to determine the serialization information for the expression: (PlaceManager pm) => pm.FreePlaces.get_Item(index) when trying to delete a value from the database (Mongo DB).

Here is my code:

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

And here is the PlaceManager class:

 public class PlaceManager { [BsonId] public int Id { get; set; } public int CurrentSize { get; set; } public Dictionary<int, List<int>> FreePlaces { get; set; } } 
+4
source share

All Articles