Exemplo n.º 1
0
        public HttpResponseMessage Get(HttpRequestMessage request)
        {
            return(CreateHttpResponse(request, () =>
            {
                var listWarranty = _warrantyService.GetAll();
                var listWarrantyVM = Mapper.Map <List <WarrantyViewModel> >(listWarranty);
                HttpResponseMessage response = request.CreateResponse(HttpStatusCode.OK, listWarrantyVM);

                return response;
            }));
        }