// GET: Items/Create public async Task <IActionResult> Create() { ViewData["CategoryId"] = new SelectList(await categoryService.Get(), "CategoryId", "Name"); ViewBag.SizeId = new SelectList(await parameterService.GetSizes(), "SizeId", "Size"); ViewBag.ColorId = new SelectList(await parameterService.GetColors(), "ColorId", "Color"); ViewBag.SizeIdCopy = ViewBag.SizeId; ViewBag.ColorIdCopy = ViewBag.ColorId; return(View()); }
public async Task <IActionResult> Create() { ViewData["ColorId"] = new SelectList(await parameterService.GetColors(), "ColorId", "Color"); ViewData["SizeId"] = new SelectList(await parameterService.GetSizes(), "SizeId", "Size"); return(View()); }