public void SelectDistinctTop <T>(SqlFragment parent, SelectDistinctTop <T> selectDistinctTop) where T : IStatement { this.Script.Append("SELECT DISTINCT TOP ("); this.Script.AppendFragment(selectDistinctTop.Count, parent, this); this.Script.Append(")"); ExpressionFormatter.FormatExpressionList(selectDistinctTop.Columns, parent, this.Script, this); }
public SelectDistinctTop <SelectStatement> SelectDistinctTop( Expression top, Expression expression, params Expression[] expressions) { var statement = new SelectStatement(this); var clause = new SelectDistinctTop <SelectStatement>( statement, top, Collection <Expression> .From(expression, expressions)); statement.FirstFragment = clause; return(clause); }