Пример #1
0
        public async Task <IActionResult> OnGet(int measurementKeyId)
        {
            MeasurementKey = await _measurementKeyData.GetById(measurementKeyId);

            if (MeasurementKey == null)
            {
                return(RedirectToPage("../Error"));
            }
            return(Page());
        }
Пример #2
0
 public async Task <IActionResult> OnGet(int?measurementKeyId)
 {
     if (measurementKeyId.HasValue)
     {
         MeasurementKey = await _measurementKeyData.GetById(measurementKeyId.Value);
     }
     else
     {
         MeasurementKey = new MeasurementKey();
     }
     if (MeasurementKey == null)
     {
         RedirectToPage("../Error");
     }
     return(Page());
 }