public async Task <IActionResult> DeleteConfirmed(int id)
        {
            Note note = await _context.FindNote(id);

            await _context.DeleteAsync(id);

            return(LocalRedirect($"~/Customers/Customer/{note.CustomerID}"));
        }
Exemple #2
0
        public async Task <IActionResult> OnPostDelete()
        {
            await _note.DeleteAsync(ID.Value);

            return(RedirectToPage("/Index"));
        }