public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } patient_detail = await _context.patient_detail.FirstOrDefaultAsync(m => m.Id == id); if (patient_detail == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } patient_detail = await _context.patient_detail.FindAsync(id); if (patient_detail != null) { _context.patient_detail.Remove(patient_detail); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }