public IActionResult Get([FromQuery] CriteriaDto criteria)
        {
            int total;
            var values = _valueLogic.GetAll(criteria, out total);
            //var result = queryOptions.ToPagedResult(values, total, "kevin", new { test = 0 });
            var result = criteria.ToPagedResult(values, total, "Get", "Values", new { test = 0 });

            return(Ok(result));
        }
Exemple #2
0
        public IActionResult Get([FromQuery] PageOptions queryOptions)
        {
            int total;
            var values = _valueLogic.GetAll(queryOptions, out total);
            var result = new PagedResult <ValueDto>(queryOptions, total, values);

            return(Ok(result));
        }
Exemple #3
0
 public IActionResult Get([FromQuery] PageOptions queryOptions)
 {
     try
     {
         int total;
         var values = _valueLogic.GetAll(queryOptions, out total);
         var result = queryOptions.ToPagedResult(values, total, "Get", "Values", new { test = 0 });
         return(Ok(result));
     }
     catch (Exception ex)
     {
         return(StatusCode((int)HttpStatusCode.InternalServerError));
     }
 }