public JsonResult Delete(int id)
        {
            var respose = new JsonResult
            {
                Data = _candidatoService.DeleteCandidato(id)
            };

            return(respose);
        }
示例#2
0
 public IActionResult DeleteCandidato(int idCandidato)
 {
     try
     {
         _candidatoService.DeleteCandidato(idCandidato);
         return(Ok());
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
 public IActionResult DeleteCandidatos(int idCandidato)
 {
     try
     {
         _candidatoService.DeleteCandidato(idCandidato);
         return(Ok(new { Sucess = true, Message = "Deletado com sucesso" }));
     }
     catch (Exception exception)
     {
         return(BadRequest(exception));
     }
 }