Example #1
0
 public IActionResult Get(int id)
 {
     try
     {
         var value = _valueLogic.GetById(id);
         return(Ok(value));
     }
     catch (ArgumentOutOfRangeException)
     {
         return(BadRequest());
     }
     catch (NotFoundException)
     {
         return(NotFound());
     }
 }
Example #2
0
        public IActionResult Get(int id)
        {
            var value = _valueLogic.GetById(id);

            return(Ok(value));
        }
Example #3
0
        public IActionResult Get(int id, [FromQuery] QueryOptions query)
        {
            var value = _valueLogic.GetById(id, query.Fields);

            return(Ok(value));
        }