public async Task <ActionResult> Delete(Guid id) { var curso = await _cursoRepository.GetByIdNoTracking(id); if (curso == null) { return(NotFound()); } await _cursoService.Delete(id); return(NoContent()); }