public IActionResult Cadastrar()
 {
     ViewBag.Categorias = _categoriaRepository.FindAllCategoria().Select(a => new SelectListItem(a.Nome, a.Id.ToString()));
     return(View());
 }
Beispiel #2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var ListaCategoria = _categoriaRepository.FindAllCategoria().ToList();

            return(View(ListaCategoria));
        }