private TestGroupByWithElementSelector ( ) : void | ||
return | void |
public virtual void TestGroupByWithElementSelector()
{
// note: groups are retrieved through a separately execute subquery per row
var list = db.Orders.Where(o => o.CustomerID == "ALFKI").GroupBy(o => o.CustomerID, o => (o.CustomerID == "ALFKI" ? 1 : 1)).ToList();
AssertValue(1, list.Count);
AssertValue(6, list[0].Count());
AssertValue(6, list[0].Sum());
}