Skip to content

Commit

Permalink
Map initials
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleybot committed Jul 1, 2024
1 parent 4e293a0 commit 24de48b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/UDS.Net.API/Extensions/DtoToEntityMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ private static void SetBaseProperties(this Form entity, FormDto dto)
entity.IsDeleted = dto.IsDeleted;
entity.Status = dto.Status;

if (dto.INITIALS == null)
entity.INITIALS = string.Empty; // INITIALS can't be null, so use empty string
else
entity.INITIALS = dto.INITIALS;

if (dto.FRMDATE > DateTime.MinValue)
entity.FRMDATE = dto.FRMDATE;
else
Expand Down
1 change: 1 addition & 0 deletions src/UDS.Net.API/Extensions/EntityToDtoMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ private static VisitDto ConvertVisitToDto(Visit visit)
PACKET = visit.PACKET,
FORMVER = visit.FORMVER,
VISIT_DATE = visit.VISIT_DATE,
INITIALS = visit.INITIALS,
Forms = new List<FormDto>()
};

Expand Down

0 comments on commit 24de48b

Please sign in to comment.