public async Task <IActionResult> DeleteConfirmed(int id) { Note note = await _context.FindNote(id); await _context.DeleteAsync(id); return(LocalRedirect($"~/Customers/Customer/{note.CustomerID}")); }
public async Task <IActionResult> OnPostDelete() { await _note.DeleteAsync(ID.Value); return(RedirectToPage("/Index")); }