示例#1
0
        public IActionResult Index()
        {
            var allShoesVm = new ShoeListViewModel
            {
                Shoes = _shoesService.GetAllShoes()
            };

            var allShoes = allShoesVm.Shoes;

            return(View(allShoes));
        }
示例#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));
        }
示例#3
0
        public IActionResult GetAllShoes()
        {
            var allShoes = _shoesService.GetAllShoes();

            return(Ok(allShoes));
        }