public HttpResponseMessage GetAllProducts()
        {
            var response = Request.CreateResponse(HttpStatusCode.OK);

            response.Content = new ObjectContent <List <Product> >(obj.GetAllProducts(), new JsonMediaTypeFormatter());
            return(response);
        }
예제 #2
0
        public Basket()
        {
            ProductInfo itemInfo = new ProductInfo();

            AllItems       = itemInfo.GetAllProducts();
            ShoppingBasket = new Dictionary <Items, int>();
        }
예제 #3
0
        public ViewResult List()
        {
            ProductInfo pInfo = new ProductInfo();

            return(View(pInfo.GetAllProducts()));
        }