public IActionResult Index() { var allShoesVm = new ShoeListViewModel { Shoes = _shoesService.GetAllShoes() }; var allShoes = allShoesVm.Shoes; return(View(allShoes)); }
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)); }
public IActionResult GetAllShoes() { var allShoes = _shoesService.GetAllShoes(); return(Ok(allShoes)); }