Beispiel #1
0
        // GET api/Vendedor
        public HttpResponseMessage Get()
        {
            HttpResponseMessage response;

            try
            {
                VendedorService service    = (VendedorService) new VendedorService().setDatabase(db);
                List <Vendedor> vendedores = service.getAll();



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