I am trying to find an item in a list where the managed metadata field is equal to a certain text value. This is the code that I have which is not getting any items in the list (ListItemCollection count = 0). Is this the right way to go about the query?
Update: I added loading the list item collection. Now I am getting all of the items in the list
List list = web.Lists.GetByTitle("Name of List");
string textValue = "Meta Data Term Text";
CamlQuery query = new CamlQuery();
query.ViewXml = @"<Where>
<Contains>
<FieldRef Name='MetaDataFieldInternalName' />
<Value Type='Text'>" + textValue + @"</Value>
</Contains>
</Where>";
ListItemCollection lColl = list.GetItems(query);
clientContext.Load(lColl); //added
clientContext.ExecuteQuery(); //added
ListItem lItem = lColl[0];
clientContext.Load(lItem, item => item["InternalName1"], item => item["InternalName2"]);
clientContext.ExecuteQuery();