Example #1
0
        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());
        }
Example #2
0
 public async Task OnGet()
 {
     MeasurementKeys = await _measurementKeyData.GetMeasurementKeysByName(SearchTerm);
 }