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