Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            var colaborador = _colaboradorAppServices.GetById(id);

            _colaboradorAppServices.Delete(colaborador);

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 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"));
     }
 }