public async Task DeleteNote(int id) { try { NotenProcessor.DeleteNoteAsync(id, ConnectionString); } catch (Exception ex) { throw new Exception(ex.Message); } }
public async Task <IActionResult> Delete_Post(int id) { try { await NotenProcessor.DeleteNoteAsync(id, ConnectionString); return(RedirectToAction("Index")); } catch (Exception ex) { throw new Exception(ex.Message); } }