public IActionResult Index() { return View(CategoriasRepository.FindAll()); }
public IActionResult Index() { ViewData["Idcategoria"] = CategoriasRepository.FindAll(); // if (TempData["Id"].ToString() != null){ // ViewBag.Id = TempData["Id"].ToString(); // } return(View(ProdutosRepository.FindAll())); //Categorias = CategoriasRepository.FindAll()}); }
public IActionResult Create() { ViewData["Idcategoria"] = new SelectList(CategoriasRepository.FindAll(), "Id", "Descricao"); return(View()); }