public static DbValue Max(this RowCollection rowCollection, string column)
 {
     return(rowCollection.AggregateByColumn(column, (max, current) =>
                                            (max == null || DbValueMath.Compare(current, max, Comparison.GreaterThan)) ? current : max));
 }
 public static DbValue Min(this RowCollection rowCollection, string column)
 {
     return(rowCollection.AggregateByColumn(column, (min, current) =>
                                            (min == null || DbValueMath.Compare(current, min, Comparison.LessThan)) ? current : min));
 }
 public static IEnumerable <Row> OrderDescending(this RowCollection rowCollection, string column)
 {
     return(rowCollection.Order(new Order(column, false)));
 }
 public static IEnumerable <Row> Order(this RowCollection rowCollection, params Order[] orders)
 {
     return(rowCollection.Order((IEnumerable <Order>)orders));
 }
 public static IEnumerable <Row> Order(this RowCollection rowCollection, string column)
 {
     return(rowCollection.Order(new Order(column, true)));
 }
 public static IEnumerable <Row> Where(this RowCollection rowCollection, IEnumerable <Condition> conditions)
 {
     return(rowCollection.Where(row => CheckRowForConditions(row, conditions)).ToList());
 }
 public static IEnumerable <Row> Where(this RowCollection rowCollection, params Condition[] conditions)
 {
     return(rowCollection.Where((IEnumerable <Condition>)conditions));
 }
 public static IEnumerable <Row> Where(this RowCollection rowCollection, string column, Comparison comparison, DbValue value)
 {
     return(rowCollection.Where(new Condition(column, comparison, value)));
 }
 public static DbValue Sum(this RowCollection rowCollection, string column)
 {
     return(rowCollection.AggregateByColumn(column, DbValueMath.Sum));
 }