Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// This....
QueryByAttribute qba = new QueryByAttribute("entityName")
{
ColumnSet = new ColumnSet("fieldA", "fieldB")
};
// There may be several of these lines
qba.AddAttributeValue("fieldC", "fieldCValue");
// ....becomes this
QueryExpression qex = new QueryExpression("entityName")
{
ColumnSet = new ColumnSet("fieldA", "fieldB")
};
qex.Criteria.AddCondition("fieldC", ConditionOperator.Equal, "fieldCValue");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment