示例#1
0
        //Metodo delete
        public HttpResponseMessage DeleteCliente(int id)
        {
            Cliente cliente = db.GetCliente(id);

            if (cliente == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound, "No hay registros con ID " + id));
            }
            db.DeleteCliente(id);
            return(Request.CreateResponse(HttpStatusCode.OK, "Cliente eliminado"));
        }
示例#2
0
 public void Delete(int id)
 {
     _cliente.DeleteCliente(id);
 }