public ITableQueryAsync <T> OrderBy <TValue>(Expression <Func <T, TValue> > orderExpr) { if (orderExpr == null) { throw new ArgumentNullException("orderExpr"); } return(new TableQueryAsync <T>( _innerQuery.OrderBy(orderExpr), _db, _taskScheduler ?? TaskScheduler.Default, _taskCreationOptions)); }
private async Task DoOrderByMultiField() { var enumerable = connection.RunAsync(testTable .OrderBy(o => o.Name) .ThenBy(o => o.Name) .ThenByDescending(o => o.Name) ); Assert.That(enumerable, Is.Not.Null); var count = 0; while (true) { if (!await enumerable.MoveNext()) { break; } ++count; Assert.That(enumerable.Current.Name, Is.EqualTo(count.ToString())); } Assert.That(count, Is.EqualTo(7)); }
public IAsyncTableQuery <T> OrderBy <U>(Expression <Func <T, U> > orderExpr) { return(new AsyncTableQuery <T>(_innerQuery.OrderBy <U>(orderExpr))); }