From 08fc18b4aa957e0e0898e46ef14de7db5839cdb5 Mon Sep 17 00:00:00 2001 From: dlebee <36390643+dlebee@users.noreply.github.com> Date: Wed, 14 Mar 2018 19:51:31 -0500 Subject: [PATCH 1/3] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 6723133..ce1e9f7 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,22 @@ You may visit this test for more examples: https://github.com/PoweredSoft/Dynami query.Where("FirstName", ConditionOperators.Equal, "David"); ``` +### Grouping Support +```csharp +TestData.Sales + .AsQueryable() + .GroupBy(t => t.Path("ClientId")) + .Select(t => + { + t.Key("TheClientId", "ClientId"); + t.Count("Count"); + t.LongCount("LongCount"); + t.Sum("NetSales"); + t.Average("Tax", "TaxAverage"); + t.ToList("Sales"); + }); +``` + ### In Support You can filter with a list, this will generate a contains with your list. ```csharp From 8c90c391447bb67f6f8a116f98b71d1a4949438b Mon Sep 17 00:00:00 2001 From: dlebee <36390643+dlebee@users.noreply.github.com> Date: Wed, 14 Mar 2018 19:53:33 -0500 Subject: [PATCH 2/3] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index ce1e9f7..c6b74f5 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,19 @@ TestData.Sales t.Average("Tax", "TaxAverage"); t.ToList("Sales"); }); + +equivalent to + +TestSales + .GroupBy(t => new { t.ClientId }) + .Select(t => new { + TheClientId = t.Key.ClientId, + Count = t.Count(), + LongCount = t.LongCount(), + NetSales = t.Sum(t2 => t2.NetSales), + TaxAverage = t.Average(t2 => t2.Tax), + Sales = t.ToList() + }); ``` ### In Support From b27736f19235a7af1e0f11044ee9d878ac98b5b8 Mon Sep 17 00:00:00 2001 From: dlebee <36390643+dlebee@users.noreply.github.com> Date: Wed, 14 Mar 2018 19:53:58 -0500 Subject: [PATCH 3/3] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6b74f5..f2bf950 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ TestData.Sales t.Average("Tax", "TaxAverage"); t.ToList("Sales"); }); - -equivalent to - +``` +Is equivalent to +```csharp TestSales .GroupBy(t => new { t.ClientId }) .Select(t => new {