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

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

            return(Ok(value));
        }