c# - Azure DocumentDB , Search In Dictionary with LINQ -


hi getting error while using

query = query.where(r => r.features.containsvalue(fueltype));  

here model

public class vehicleresponse          {             [jsonproperty(propertyname = "id")]             public string id { get; set; }              public vehicle vehicle { get; set; }              public list<string> photourls { get; set; }              public string videourl { get; set; }              public dictionary<string, string> features { get; set; }              public list<string> equipments { get; set; }              public vehicleresponse()             {                 this.photourls = new list<string>();             }         } 

documentdb not supporting "containsvalue" method. how should change linq query ?

thank you.

if define features this:

  "features": {     "tkey": "tk1",     "tvalue": "tv1"   } 

you change : query = query.where(r => r.features["tkey"].contains("t"));

you read documents more information.


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -