public IActionResult get(int id) { CateringService service = new CateringService(); var status = true; CateringModel result = null; try{ result = service.get(id); }catch (System.Exception) { status = false; } var rtn = new { status = status, result = result }; return(Ok(rtn)); }