public async Task <IActionResult> OnGet(int?measurementId) { Aquariums = await _aquariumData.GetAquariumsByName(null); if (measurementId.HasValue) { Measurement = await _measurementData.GetById(measurementId); //MeasurementKeys = await _measurementKeyData.GetMeasurementKeysByApplicableType(AquariumType.FRESHWATER); } else { Measurement = new Measurement(); MeasurementKeys = await _measurementKeyData.GetMeasurementKeysByName(null); } if (Measurement == null) { RedirectToPage("../Error"); } return(Page()); }
public async Task OnGet() { MeasurementKeys = await _measurementKeyData.GetMeasurementKeysByName(SearchTerm); }