public IActionResult Delete(Guid id) { try { var curso = _cursoRepository.BuscarPorId(id); if (curso == null) { return(NotFound()); } _cursoRepository.Remover(id); return(Ok(curso)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void Delete(Guid id) { _CursoRepository.Remover(id); }