public async Task <IActionResult> Delete(Guid id) { var deleted = await _grupoService.DeleteAsync(id); if (deleted) { return(Ok()); } return(NotFound()); }
public async Task <IActionResult> Delete(string GrupoId) { try { await _grupoService.DeleteAsync(GrupoId); return(Ok(GrupoId)); } catch (CannotDeleteException ex) { return(UnprocessableEntity(ex.Message)); } }