allows to specify the type instead.

This commit is contained in:
David Lebee 2018-10-19 16:22:37 -05:00
parent e02752bfa7
commit 019d34bf01

View File

@ -59,6 +59,23 @@ namespace PoweredSoft.DynamicLinq.Fluent
return this; 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) public SelectBuilder Path(string path, string propertyName = null)
{ {
if (propertyName == null) if (propertyName == null)