public void Select_PagedWithAggregate() { SubSonic.SqlQuery query = new SubSonic.Select( SubSonic.Aggregate.GroupBy(Product.Columns.CategoryID)) .Paged(1, 3) .From(Product.Schema) .Where(Product.Columns.ProductID).IsGreaterThan(0); string exMsg = ""; try { ProductCollection plist = query.ExecuteAsCollection <ProductCollection>(); } catch (Exception ex) { exMsg = ex.Message; } Assert.IsTrue(!exMsg.Contains("syntax near the keyword 'WHERE'"), exMsg + "\r\n" + query.BuildSqlStatement()); }
public void Acc_Exec_PagedWithAggregate() { SubSonic.SqlQuery query = new SubSonic.Select( SubSonic.Aggregate.GroupBy(Product.Columns.CategoryID)) .Paged(1, 3) .From(Product.Schema) .Where(Product.Columns.ProductID).IsGreaterThan(0); string exMsg = ""; try { ProductCollection plist = query.ExecuteAsCollection<ProductCollection>(); } catch (Exception ex) { exMsg = ex.Message; } Assert.IsTrue(!exMsg.Contains("syntax near the keyword 'WHERE'"), exMsg + "\r\n" + query.BuildSqlStatement()); }