Exemplo n.º 1
0
        public IActionResult Index()
        {
            var allShoesVm = new ShoeListViewModel
            {
                Shoes = _shoesService.GetAllShoes()
            };

            var allShoes = allShoesVm.Shoes;

            return(View(allShoes));
        }
Exemplo n.º 2
0
        public IActionResult AddShoeView()
        {
            var allShoesVm = new ShoeListViewModel
            {
                Shoes = _shoesService.GetAllShoes()
            };
            var allBrandsVM = _brandServices.GetAllBrands();

            dynamic myModel = new ExpandoObject();

            myModel.AllShoes = allShoesVm.Shoes;
            myModel.Brand    = allBrandsVM;

            return(View(myModel));
        }
Exemplo n.º 3
0
        public IActionResult GetAllShoes()
        {
            var allShoes = _shoesService.GetAllShoes();

            return(Ok(allShoes));
        }