public BeerContainerDto( Beer beer, Container container, TemperatureAlert temperatureAlert ) { Beer = new BeerDto(beer); Container = new ContainerDto(container); if (temperatureAlert != null) { TemperatureAlert = new TemperatureAlertDto(temperatureAlert); } }
public TemperatureAlertDto(TemperatureAlert temperatureAlert) { TemperatureAlertTypeId = temperatureAlert.TemperatureAlertType; TemperatureAlertType = TemperatureAlertTypeId.GetDescription(); Temperature = temperatureAlert.Temperature; }