This class is used to retrieve data from an entity based on a simple query where we can check attributes for equality. It only supports the logical AND operator, and we can only combine two conditions using the AND operator:
// Create query using querybyattribute
QueryByAttribute querybyattribute = new QueryByAttribute("him_vehicle");
querybyattribute.ColumnSet = new ColumnSet("him_name", "him_make");
querybyattribute.Attributes.AddRange("him_name");
querybyattribute.Values.AddRange("Tata");
EntityCollection retrieved = _serviceProxy.RetrieveMultiple(querybyattribute);
In the preceding code, you can see that we are fetching the vehicle entity's data based on its name.
You can find out more about the QueryByAttribute class at https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/org-service/use-querybyattribute-class.