Skip to content

Commit

Permalink
Returns numerical value for language and reason code
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleybot committed Jul 27, 2023
1 parent 2c4ea30 commit d311265
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/UDS.Net.API/Extensions/EntityToDtoMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public static VisitDto ToDto(this Visit visit)
CreatedBy = formStatus.CreatedBy,
CreatedAt = formStatus.CreatedAt,
IsIncluded = formStatus.IsIncluded,
Language = formStatus.Language.HasValue ? formStatus.Language.Value.ToString() : "",
Language = formStatus.Language.HasValue ? ((int)formStatus.Language).ToString() : "",
ModifiedBy = formStatus.ModifiedBy,
ReasonCode = formStatus.ReasonCode.HasValue ? formStatus.ReasonCode.Value.ToString() : ""
ReasonCode = formStatus.ReasonCode.HasValue ? ((int)formStatus.ReasonCode).ToString() : ""
});
}
}
Expand Down Expand Up @@ -138,8 +138,8 @@ public static VisitDto ToDto(this Visit visit, string formKind)
DeletedBy = form.DeletedBy,
IsDeleted = form.IsDeleted,
IsIncluded = form.IsIncluded,
Language = form.Language.HasValue ? form.Language.Value.ToString() : "",
ReasonCode = form.ReasonCode.HasValue ? form.ReasonCode.Value.ToString() : ""
Language = form.Language.HasValue ? ((int)form.Language).ToString() : "",
ReasonCode = form.ReasonCode.HasValue ? ((int)form.ReasonCode).ToString() : ""
};
}
dto.Forms.Add(formDto);
Expand Down Expand Up @@ -167,9 +167,9 @@ private static void SetBaseFormProperties(this FormDto dto, Form form)
dto.IsDeleted = form.IsDeleted;
dto.VisitId = form.VisitId;
dto.Status = form.Status;
dto.Language = form.Language.HasValue ? form.Language.Value.ToString() : "";
dto.Language = form.Language.HasValue ? ((int)form.Language).ToString() : "";
dto.IsIncluded = form.IsIncluded;
dto.ReasonCode = form.ReasonCode.HasValue ? form.ReasonCode.Value.ToString() : "";
dto.ReasonCode = form.ReasonCode.HasValue ? ((int)form.ReasonCode).ToString() : "";
}
}

Expand Down

0 comments on commit d311265

Please sign in to comment.