Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Visits the specified <see cref="SqlSort"/>.
 /// </summary>
 /// <param name="expression">
 /// The expression to visit.
 /// </param>
 public virtual void Visit(SqlSort expression)
 {
 }
Exemplo n.º 4
0
 public void ExpressionType_ReturnsSort()
 {
     var sort = new SqlSort("dbo.Users.Id", SqlSortOrder.Ascending);
     Assert.Equal(SqlExpressionType.Sort, sort.ExpressionType);
 }
Exemplo n.º 5
0
        public void ExpressionType_ReturnsSort()
        {
            var sort = new SqlSort("dbo.Users.Id", SqlSortOrder.Ascending);

            Assert.Equal(SqlExpressionType.Sort, sort.ExpressionType);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Visits the specified <see cref="SqlSort"/>.
 /// </summary>
 /// <param name="expression">
 /// The expression to visit.
 /// </param>
 public virtual void Visit(SqlSort expression)
 {
 }
 protected override SqlExpression VisitSort(SqlSort expression)
 {
     Visit(expression.Column);
     _writer.WriteSortOrder(expression.SortOrder);
     return expression;
 }