Unable to determine the serialization information when trying to query the child MongoDB C#
NickName:not 0x12 Ask DateTime:2015-11-06T18:01:44

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<Fruit>.Filter.Eq( x => x.Id, fruitId );
                var update = Builders<Fruit>.Update.Set( x => x.FruitDetails.FirstOrDefault( y => y.Id.Equals( FruitDetail.Id ) ), FruitDetail );

Unfortunately this throws an error in Update Linq Query and i do not know how to fix this

   Unable to determine the serialization information for the expression: (Fruit x) => Enumerable.FirstOrDefault<FruitDetails>(x.FruitDetails, (Fruit p) => p.Id.Equals(<mongoID>)).

Copyright Notice:Content Author:「not 0x12」,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/33564104/unable-to-determine-the-serialization-information-when-trying-to-query-the-child

More about “Unable to determine the serialization information when trying to query the child MongoDB C#” related questions

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

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 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 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 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 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 *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

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

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