Beispiel #1
0
        public async Task <IActionResult> OnPostDeleteAsync()
        {
            if (NoteId == null)
            {
                return(NotFound());
            }

            _noteData.Delete(NoteId.GetValueOrDefault());

            return(RedirectToPage("Index"));
        }
Beispiel #2
0
 public IActionResult DeleteNote(int id)
 {
     _noteData.Delete(id);
     return(RedirectToAction("NoteList"));
 }