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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -