public async Task <object> GetById(int id) { Code code = new Code(); try { code = _codeRepository.GetById(id); } catch (Exception ex) { result = false; error = ex.Message; } return(new SingleResponse <Code> { Message = "Get by id code execute successfully", DidError = false, ErrorMessage = string.Empty, Token = string.Empty, Model = code }); }