regular selectables.

This commit is contained in:
David Lebée
2018-03-21 20:00:46 -05:00
parent 3f5433ba53
commit 57fbee664e
5 changed files with 106 additions and 2 deletions
@@ -51,6 +51,23 @@ namespace PoweredSoft.DynamicLinq.Fluent
return this;
}
public SelectBuilder Path(string path, string propertyName = null)
{
if (propertyName == null)
propertyName = path.Split('.').LastOrDefault();
throwIfUsedOrEmpty(propertyName);
Parts.Add(new SelectPart
{
Path = path,
PropertyName = propertyName,
SelectType = SelectTypes.Path
});
return this;
}
public SelectBuilder Count(string propertyName)
{
throwIfUsedOrEmpty(propertyName);
@@ -116,6 +133,23 @@ namespace PoweredSoft.DynamicLinq.Fluent
return this;
}
public SelectBuilder PathToList(string path, string propertyName = null)
{
if (propertyName == null)
propertyName = path.Split('.').LastOrDefault();
throwIfUsedOrEmpty(propertyName);
Parts.Add(new SelectPart
{
Path = path,
PropertyName = propertyName,
SelectType = SelectTypes.PathToList
});
return this;
}
public virtual IQueryable Build()
{
if (Empty)