/// <summary> /// Processes the single aggregate. /// </summary> /// <param name="dto">The dto to process.</param> /// <param name="aggregateNode">The aggregate node.</param> /// <returns>A <see cref="System.Boolean"/></returns> protected override bool ProcessSingleAggregate(GpraDischargeDto dto, GpraDischarge aggregateNode) { var result = _mappingResult &= MappingProperties(dto, aggregateNode); _mappingResult &= result; return(_mappingResult); }
private bool MappingProperties(GpraDischargeDto gpraDischargeDto, GpraDischarge gpraDischarge) { var dischargeStatus = _mappingHelper.MapLookupField <GpraDischargeStatus> (gpraDischargeDto.GpraDischargeStatus); var dischargeTerminationReason = _mappingHelper.MapLookupField <GpraDischargeTerminationReason> (gpraDischargeDto.GpraDischargeTerminationReason); AggregateRoot.ReviseGpraDischarge( new GpraDischargeSection( gpraDischargeDto.GpraDischargeDate, dischargeStatus, gpraDischargeDto.GpraDischargeStatusOtherDescription, dischargeTerminationReason, string.Empty, gpraDischargeDto.GpraHivTestIndicator, gpraDischargeDto.GpraReferToHivTestIndicator )); gpraDischargeDto.Key = AggregateRoot.GpraDischarge.Key; return(true); }