Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }