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()});
        }
Esempio n. 3
0
 public IActionResult Create()
 {
     ViewData["Idcategoria"] = new SelectList(CategoriasRepository.FindAll(), "Id", "Descricao");
     return(View());
 }