コード例 #1
0
        public IODataOptionList <TEntity> OrderByDescending(Expression <Func <TEntity, object> > entityOrderByDescending)
        {
            var query = new ODataOptionOrderByExpressionVisitor().ToQuery(entityOrderByDescending.Body);

            _stringBuilder.Append($"{ODataOptionNames.OrderBy}{QuerySeparators.EqualSign}{query} {QuerySorts.Desc}{QuerySeparators.Main}");

            return(this);
        }
コード例 #2
0
        public IODataOptionNested <TEntity> OrderBy(Expression <Func <TEntity, ISortFunction, object> > entityOrderBy)
        {
            var query = new ODataOptionOrderByExpressionVisitor().ToQuery(entityOrderBy.Body);

            _stringBuilder.Append($"{ODataOptionNames.OrderBy}{QuerySeparators.EqualSign}{query}{QuerySeparators.Nested}");

            return(this);
        }