Пример #1
0
        public HttpResponseMessage GetById(HttpRequestMessage request, string id)
        {
            return(CreateHttpResponse(request, () =>
            {
                Footer model = _footerService.GetSingleByString(id);

                var reponseData = Mapper.Map <Footer, FooterViewModel>(model); //lấy giữ liệu thông qua mapper

                var response = request.CreateResponse(HttpStatusCode.OK, reponseData);
                return response;
            }));
        }