Exemplo n.º 1
0
        public SneakerAll GetItemDb()
        {
            SneakerAll sneakerAll = new SneakerAll
            {
                Brands     = db.Brands.ToList(),
                Categories = db.Categories.ToList(),
                Materials  = db.Materials.ToList()
            };

            return(sneakerAll);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create(Models.Sneaker sneaker, SneakerAll sneakerAll)
        {
            if (ModelState.IsValid)
            {
                sneaker.SneakerId   = sneakerAll.Id;
                sneaker.Description = sneakerAll.Descriptions;
                sneaker.SneakerName = sneakerAll.Name;
                sneaker.CategoryId  = sneakerAll.SelectedCategory;
                sneaker.MaterialId  = sneakerAll.SelectedMaterial;
                sneaker.BrandId     = sneakerAll.SelectedBrand;
                br.Create(sneaker);
                br.Save();
                return(RedirectToAction("Index"));
            }

            return(View(sneakerAll));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create()
        {
            SneakerAll sneakerAll = br.GetItemDb();

            return(View(sneakerAll));
        }