public bool Delete(tbcandidato candidato)
        {
            CandidatoBusiness biz = new CandidatoBusiness();

            biz.Delete(candidato);
            return(true);
        }
        public HttpResponseMessage Delete(int Id)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    CandidatoBusiness.Delete(Id);
                    var candidatos = CandidatoBusiness.Listar();
                    var response   = Request.CreateResponse(HttpStatusCode.OK, candidatos);
                    return(response);
                }

                return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
            }
        }