Beispiel #1
0
        public object getOnlyProducts()
        {
            var model = new ProductsShoppingListViewModel();

            model.Products     = new ProductsRepository().getProducts();
            model.ShoppingList = null;

            return(model);
        }
Beispiel #2
0
        public ProductsShoppingListViewModel getProductsAndShoppingList()
        {
            var productsList = getProducts();
            var shoppingList = getShoppList();

            var result = new ProductsShoppingListViewModel
            {
                Products     = productsList,
                ShoppingList = shoppingList
            };

            return(result);
        }