Skip to content

[Feature Request] Add the ability to filter and aggregate IEnumerables before comparing to a value #31

Description

@RubberChickenParadise

In one of my recent projects I need to dynamically code similar to the following:

var woot = new Foo
           {
               Bar = new List<Bar>
                     {
                         new Bar {Baz = 1m, Type = "A"}, new Bar {Baz = 1m, Type = "A"}, new Bar {Baz = 1m, Type = "A"},
                         new Bar {Baz = 1m, Type = "A"}, new Bar {Baz = 1m, Type = "B"},
                     }
           };

if (woot.Bar.Where(x => x.Type == "A")
        .Sum(x => x.Baz) > 5)
{
    //Do stuff
}

Please add functionality that will enable filtering and aggregating an IEnumerable before comparing to the greater than 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions