Exemple #1
0
        public IActionResult Delete(int id)
        {
            try
            {
                if (id == 0)
                {
                    return(NotFound());
                }

                if (candidatoService.Get(id) == null)
                {
                    return(NotFound());
                }

                candidatoService.Delete(id);
                return(Ok(id));
            }
            catch (Exception ex)
            {
                _logger.LogCritical(ex, string.Format("Houve um erro ao remover um Candidato ID {0}.", id));
                return(StatusCode(500));
            }
        }