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()));
        }