コード例 #1
0
        public IActionResult GetOneBy(int id)
        {
            var maybeValue = service.GetValueBy(id);

            return(maybeValue.HasValue
                                ? (IActionResult)Content(maybeValue.Value, "text/plain")
                                : NotFound());
        }