public IHttpActionResult Get(int id)
 {
     ThrowIfUserHasNoRole(readRole);
     using (IssueTypeQuery issueTypeQuery = new IssueTypeQuery(Db))
     {
         var data = issueTypeQuery.GetByPrimaryKey(id);
         SaveLog("IssueType", "Get", JsonConvert.SerializeObject(new { primaryKey = id }));
         return(Ok(new SuccessResponse(data)));
     }
 }
        private IssueTypeEntryModel GetUpdateStateModel(int issueTypePK)
        {
            IssueTypeEntryFormData formData     = new IssueTypeEntryFormData();
            List <Control>         formControls = CreateFormControls(issueTypePK);
            IssueTypeDTO           issueTypeDTO = issueTypeQuery.GetByPrimaryKey(issueTypePK);

            if (issueTypeDTO == null)
            {
                throw new KairosException($"Record with primary key '{issueTypeDTO.IssueType_PK}' is not found.");
            }

            return(new IssueTypeEntryModel()
            {
                FormData = formData,
                FormControls = formControls,
                Model = issueTypeDTO,
            });
        }