public static PediatriciansExaminationDTO VMToDTO( PediatriciansExaminationVM pediatriciansExaminationVM) { var mapper = mapperConfiguration.CreateMapper(); return(mapper.Map <PediatriciansExaminationDTO>(pediatriciansExaminationVM)); }
public IHttpActionResult SavePediatriciansExamination(int childCardId, [FromBody] PediatriciansExaminationVM examinationVM) { try { var examinationDTO = PediatriciansExaminationHelper.VMToDTO(examinationVM); var resultDTO = childCardService.SavePediatriciansExamination(childCardId, examinationDTO); var resultVM = PediatriciansExaminationHelper.DTOToVM(resultDTO); return(Ok(resultVM)); } catch (Exception exception) { return(InternalServerError(exception)); } }