public ActionResult DeleteConfirmed(int id) { var colaborador = _colaboradorAppServices.GetById(id); _colaboradorAppServices.Delete(colaborador); return(RedirectToAction("Index")); }
public HttpResponseMessage Delete(Colaborador colaborador) { if (colaborador.ColaboradorId <= 0) { return(Request.CreateResponse(HttpStatusCode.BadRequest)); } else { _colaboradorAppServices.Delete(colaborador); return(Request.CreateResponse(HttpStatusCode.OK, "Colaborador excluído")); } }