Unable to determine the serialization information for the expression error
NickName:Yury Pogrebnyak Ask DateTime:2012-12-07T05:26:07

Unable to determine the serialization information for the expression error

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

More about “Unable to determine the serialization information for the expression error” related questions

Unable to determine the serialization information for the expression error

I'm getting an Unable to determine the serialization information for the expression: (PlaceManager pm) =&gt; pm.FreePlaces.get_Item(index) error when trying to remove value from database (Mongo DB)...

Show Detail

MongoDB Unable to determine the serialization information for the expression error

My data is having following structure public enum ParamType { Integer=1, String=2, Boolean=3, Double=4 } public class Gateway { public int _id { get; set; } public string

Show Detail

Unable to determine the serialization information for "Expression"

I receive the error message Unable to determine the serialization information for a => a.CurrentProcessingStep when I try to Update my document. I'm using the Mongo .NET Driver version 2.8 and .NET

Show Detail

Unable to determine the serialization information for

While trying to Upsert a list @ MongoDB i get the following error: &quot;Unable to determine the serialization information for o =&gt; o.&quot; Order.cs *(removed properties for testing): public ...

Show Detail

Unable to determine the serialization information IIF

I have a price range query I'm trying to write for my C# code and depending on the currency type of the product I need to query the correct field var minPrice = builder.Gte(s =&gt; s.Price.Currenc...

Show Detail

Unable to determine the serialization information when trying to query the child MongoDB C#

Um sharing my code Im using to query and get a matching child element to do an update to an element in an array in mongoDB Collection var filter = Builders&lt;Fruit&gt;.Filter.Eq...

Show Detail

Unable to determine the serialization information for *expression* using .Date

I'm trying to read from a mongoDB collection with a Date filter (only the Date, time should be ignored): var filterDefinition = Builders&lt;SomeClass&gt;.Filter.Eq(p =&gt; p.SomeDateTimeProperty.D...

Show Detail

MongoDB Unable to determine the serialization information

I'm having a problem with Mongodb querying. Here's the classes: class A { } class B : A { } class C : A { public string prop1 { get; set; }

Show Detail

MongoDb - Unable to determine the serialization information

I want to update a property that exists on a class that inherits from the ISettingWidgets interface. When I run the code below, I get the error: System.InvalidOperationException: Unable to determin...

Show Detail

Unable to determine the serialization information for the expression for simple equals operator in MongoDB

I'm currently having an issue where I can't use an Expression&lt;Func&lt;TDocument, bool&gt;&gt; predicate for a simple i =&gt; i.UserName == username query. I have the following model class: pub...

Show Detail