public void Ctor_WithColumn_SetsPropertyValues() { SqlColumn column = "dbo.Users.CreatedOn"; SqlSort sort = new SqlSort(column, SqlSortOrder.Descending); Assert.NotNull(sort.Column); Assert.Same(column, sort.Column); Assert.Equal(SqlSortOrder.Descending, sort.SortOrder); }
/// <summary> /// Visits the specified <see cref="SqlSort"/>. /// </summary> /// <param name="expression"> /// The expression to visit. /// </param> public virtual void Visit(SqlSort expression) { }
public void ExpressionType_ReturnsSort() { var sort = new SqlSort("dbo.Users.Id", SqlSortOrder.Ascending); Assert.Equal(SqlExpressionType.Sort, sort.ExpressionType); }
protected override SqlExpression VisitSort(SqlSort expression) { Visit(expression.Column); _writer.WriteSortOrder(expression.SortOrder); return expression; }