public async Task <IActionResult> GetMeasurementsByTypeAsync([FromRoute] string measurementType) { MeasurementType measurementTypeEnum = MeasurementType.humidity; Enum.TryParse(measurementType, out measurementTypeEnum); var measurements = await _measurementRepository.FindAllByTypeAsync(measurementTypeEnum); return(Ok(measurements)); }