regular selectables.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user