Ejemplo n.º 1
0
        public ConfigurableBasicSortClauseBuilder <TRequest, TEntity> SortBy(string entityProperty)
        {
            var operationBuilder = new BasicSortOperationBuilder <TRequest, TEntity>(this);

            _operations.Add(operationBuilder);

            return(operationBuilder.ThenBy(entityProperty));
        }
Ejemplo n.º 2
0
        public ConfigurableBasicSortClauseBuilder <TRequest, TEntity> SortBy <TProp>(
            Expression <Func <TEntity, TProp> > entityProperty)
        {
            var operationBuilder = new BasicSortOperationBuilder <TRequest, TEntity>(this);

            _operations.Add(operationBuilder);

            return(operationBuilder.ThenBy(entityProperty));
        }
Ejemplo n.º 3
0
        internal static ConfigurableBasicSortClauseBuilder <TRequest, TEntity> From <TProp>(
            BasicSortOperationBuilder <TRequest, TEntity> parent,
            Expression <Func <TEntity, TProp> > entityProperty)
        {
            var clauseBuilder = new ConfigurableBasicSortClauseBuilder <TRequest, TEntity>(parent)
            {
                Clause = new BasicSortClause <TRequest, TEntity, TProp>
                {
                    Direction = SortDirection.Default,
                    Clause    = entityProperty
                }
            };

            clauseBuilder.Clause.Direction = SortDirection.Default;

            return(clauseBuilder);
        }
Ejemplo n.º 4
0
 public ConfigurableBasicSortClauseBuilder(BasicSortOperationBuilder <TRequest, TEntity> parent)
     : base(parent)
 {
 }
Ejemplo n.º 5
0
 public BasicSortClauseBuilder(BasicSortOperationBuilder <TRequest, TEntity> parent)
 {
     _parentBuilder = parent ?? throw new ArgumentNullException(nameof(parent));
 }