public async Task <ActionResult <EstadoEntity> > DeleteEstadoEntity(int id) { if (id <= 0) { return(NotFound()); } var estadoEntity = await _estadoService.GetByIdAsync(id); if (estadoEntity == null) { return(NotFound()); } await _estadoService.DeleteAsync(id); return(Ok(estadoEntity)); }
public async Task <IActionResult> DeleteConfirmed(int id) { await _estadoService.DeleteAsync(id); return(RedirectToAction(nameof(Index))); }