示例#1
0
        public IActionResult GetCode(int code)
        {
            try
            {
                var codeR = codeService.GetByCode(code);

                if (codeR == null)
                {
                    return NotFound();
                }

                return Ok(codeR);
            }
            catch (Exception)
            {
                return BadRequest();
            }
        }