public DynamicDataAggregation Filter(ODataExpression filter)
 {
     if (_underlyingDataAggregationBuilder.LastOrDefault() is FilterClause filterClause)
     {
         filterClause.Append(filter);
     }
     else
     {
         filterClause = new FilterClause(filter);
         _underlyingDataAggregationBuilder.Add(filterClause);
     }
     return(this);
 }
        public DynamicDataAggregation Filter(string filter)
        {
            var filterClause = (FilterClause)_underlyingDataAggregationBuilder.LastOrDefault(x => x is FilterClause);

            if (filterClause != null)
            {
                filterClause.Append(filter);
            }
            else
            {
                filterClause = new FilterClause(filter);
                _underlyingDataAggregationBuilder.Add(filterClause);
            }
            return(this);
        }