I want to do something like the below. But I'm not sure how exactly to do it. I just want to return items with similar Title to be efficient.
List pages = clientContext.Site.RootWeb.Lists.GetByTitle("Web Part Gallery"); ListItemCollection existingWebParts = pages.GetItems(CamlQuery.CreateAllItemsQuery()); clientContext.Load(existingWebParts, items => items.Include(item => item["Title"]).Where(obj => obj == "CollapsibleAccordion.webpart")); clientContext.ExecuteQuery();
This is showing as syntax error.