private bool MapLocationOperationScheduleProperties(LocationOperationSchedule locationOperationSchedule, LocationOperationScheduleDto dto) { var result = true; result &= new PropertyMapper <LocationOperationSchedule> (locationOperationSchedule, dto).MapProperty(x => x.Name, dto.Name).Map(); result &= new AggregateNodeCollectionMapper <LocationWorkHourDto, LocationOperationSchedule, LocationWorkHour> ( dto.LocationWorkHours, locationOperationSchedule, locationOperationSchedule.LocationWorkHours).MapAddedItem( AddLocationWorkHour).MapChangedItem(ChangeLocationWorkHour).MapRemovedItem(RemoveLocationWorkHour).Map(); return(result); }
private void AddLocationOperationSchedule(LocationOperationScheduleDto dto, Location location) { var operationSchedule = location.AddOperationSchedule(dto.Name); _mappingResult &= MapLocationOperationScheduleProperties(operationSchedule, dto); }
private void ChangeLocationOperationSchedule( LocationOperationScheduleDto dto, Location location, LocationOperationSchedule locationOperationSchedule) { _mappingResult &= MapLocationOperationScheduleProperties(locationOperationSchedule, dto); }
private void RemoveLocationOperationSchedule( LocationOperationScheduleDto dto, Location location, LocationOperationSchedule locationOperationSchedule) { location.RemoveOperationSchedule(locationOperationSchedule); }