public async Task <IActionResult> Delete(int id) { try { await _noticiaService.RemoveAsync(id); return(RedirectToAction(nameof(Index))); } catch (IntegrityException e) { return(RedirectToAction(nameof(Error), new { message = e.Message })); } }
public async Task <IActionResult> Delete(int id) { try { await _noticiaService.RemoveAsync(id); return(RedirectToAction(nameof(Index))); } catch (IntegrityException e) { return(RedirectToAction(nameof(Error), new { message = e.Message })); } }