public static bool HasCondition(this FilterExpression filter, string entityName, params object[] columnNameAndValuePairs)
        {
            var tmp = new FilterExpression();

            // match all conditions one at a time.
            foreach (var condition in tmp.WhereEqual(entityName, columnNameAndValuePairs).Conditions)
            {
                if (!filter.HasCondition(condition))
                {
                    return(false);
                }
            }

            return(true);
        }