var table = new UserTable();
var query = new TableSqlQuery(table)
.Where(table.Status.EqualValue(true));
var select = new TableSelect(query)
.Select(table.Id, table.Name);
// SELECT [Id],[Name] FROM [Users] WHERE [Status]=1
var table = new UserTable();
var query = new TableQuery(table)
.And(table.Status.EqualValue(true));
var select = new TableSelect(query)
.Select(table.Id, table.Name);
// SELECT [Id],[Name] FROM [Users] WHERE [Status]=1
var table = new CommentTable();
var query = new TableSqlQuery(table)
.Where(table.Pick.EqualValue(true));
var groupBy = GroupBySqlQuery.Create(query, table.PostId);
var select = new TableSelect(groupBy)
.Select(table.PostId, groupBy.CountAs("CommentCount"));
// SELECT [PostId],COUNT(*) AS CommentCount FROM [Comments] WHERE [Pick]=1 GROUP BY [PostId]
var table = new CommentTable();
var query = new TableQuery(table)
.And(table.Pick.EqualValue(true));
var groupBy = GroupByQuery.Create(query, table.PostId);
var select = new TableSelect(groupBy)
.Select(table.PostId, groupBy.CountAs("CommentCount"));
// SELECT [PostId],COUNT(*) AS CommentCount FROM [Comments] WHERE [Pick]=1 GROUP BY [PostId]