Example #1
0
        public ActionResult Deletar(int id)
        {
            var ret = _servicoRepository.Remove(id);

            if (ret == 0)
            {
                return(NotFound());
            }

            return(NoContent());
        }
Example #2
0
        public IActionResult Delete(int id)
        {
            var servico = _repositorio.Find(id);

            if (servico == null)
            {
                return(NotFound());
            }

            _repositorio.Remove(id);
            return(new NoContentResult());
        }