|
@@ -4,6 +4,8 @@ using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Linq;
|
|
|
using System.Linq.Expressions;
|
|
|
+using System.Net.Http.Headers;
|
|
|
+using System.Reflection;
|
|
|
|
|
|
namespace InABox.Core
|
|
|
{
|
|
@@ -422,6 +424,12 @@ namespace InABox.Core
|
|
|
|
|
|
#region ToLookup
|
|
|
|
|
|
+ public IEnumerable<IGrouping<TKey, TValue>> ToGroups<T, TKey, TValue>(Expression<Func<T, TKey>> key,
|
|
|
+ Expression<Func<T, TValue>> value)
|
|
|
+ {
|
|
|
+ return Rows.GroupBy(r => r.Get(key), r => r.Get(value));
|
|
|
+ }
|
|
|
+
|
|
|
public IMutableLookup<TKey, TValue> ToLookup<T, TKey, TValue>(Expression<Func<T, TKey>> key, Expression<Func<T, TValue>> value,
|
|
|
Expression<Func<T, object>>? sort = null)
|
|
|
{
|