public IActionResult GetOneBy(int id) { var maybeValue = service.GetValueBy(id); return(maybeValue.HasValue ? (IActionResult)Content(maybeValue.Value, "text/plain") : NotFound()); }