I am trying to retrieve all Components which satisfy a certain schema, and i have chosen the method "IComponentFactory.FindComponents" to do this. This method accepts an "ExtendedQueryParameters" object, which contains a "MetaQueryValues" property on it. What should I be providing in the MetaQueryValues? it boils down to a key/value collection but i just need an example of what key/value pairs i should be passing in? For example im searching for all components satisfying the General schema, using the following code:
var queryParameters = new ExtendedQueryParameters();
queryParameters.PublicationId = "9";
queryParameters.QuerySchemas = new[] { "General" };
queryParameters.MetaQueryValues = new[] { new MetaQueryItem("What key?", "What value?") };
var components = ComponentFactory.FindComponents(queryParameters);
return components.ToList();
Does anybody have an example call they have made to the FindComponents method, which shows me what to send in the MetaQueryValues? The key/value pair cannot be null/empty - and i have tried all combinations (component name, title, etc) but i get nothing back (no error - just an empty list indicating no components found).
Maybe there is an alternative method i could/should be using?
Help please!