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