prep the field for building the select statement next.

This commit is contained in:
David Lebée
2018-03-12 22:26:41 -05:00
parent 436bd5ab98
commit 30d1d9072b
4 changed files with 135 additions and 13 deletions
@@ -88,5 +88,15 @@ namespace PoweredSoft.DynamicLinq
return QueryableHelpers.GroupBy(query, type, groupBuilder.Parts, groupBuilder.Type, groupBuilder.EqualityComparerType);
}
public static IQueryable Select(this IQueryable query, Action<SelectBuilder> callback)
{
var sb = new SelectBuilder();
callback(sb);
if (sb.Empty)
throw new Exception("No select specified, please specify at least one select path");
return query;
}
}
}