public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ReasonabilityCheck = await _context.ReasonabilityChecks .Include(r => r.Measurement).FirstOrDefaultAsync(m => m.Id == id); if (ReasonabilityCheck == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ReasonabilityCheck = await _context.ReasonabilityChecks.FindAsync(id); if (ReasonabilityCheck != null) { _context.ReasonabilityChecks.Remove(ReasonabilityCheck); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ReasonabilityCheck = await _context.ReasonabilityChecks .Include(r => r.Measurement).FirstOrDefaultAsync(m => m.Id == id); if (ReasonabilityCheck == null) { return(NotFound()); } ViewData["MeasurementId"] = new SelectList(_context.PspMeasurements, "Id", "Label"); return(Page()); }