Skip to content

Commit

Permalink
allows to specify the type instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lebee committed Oct 19, 2018
1 parent e02752b commit 019d34b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions PoweredSoft.DynamicLinq/Fluent/Select/SelectBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ public SelectBuilder Key(string propertyName, string path = null)
return this;
}

public SelectBuilder Aggregate(string path, SelectTypes type, string propertyName = null)
{
if (propertyName == null)
propertyName = path.Split('.').LastOrDefault();

ThrowIfUsedOrEmpty(propertyName);

Parts.Add(new SelectPart
{
Path = path,
PropertyName = propertyName,
SelectType = type
});

return this;
}

public SelectBuilder Path(string path, string propertyName = null)
{
if (propertyName == null)
Expand Down

0 comments on commit 019d34b

Please sign in to comment.