예제 #1
0
        // DELETE api/Proveedor/5
        public HttpResponseMessage Delete(long id)
        {
            HttpResponseMessage response;

            try
            {
                ProveedorService service = (ProveedorService) new ProveedorService().setDatabase(db);
                Proveedor        p       = service.find(id);
                service.delete(id);

                response = this.getSuccessResponse(p);
            }
            catch (Exception e)
            {
                response = this.getErrorResponse(e);
            }
            return(response);
        }