示例#1
0
        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));
            }
        }
示例#2
0
 public void Delete(Guid id)
 {
     _CursoRepository.Remover(id);
 }