public async Task <IViewComponentResult> InvokeAsync()
        {
            var categoryList = _categoriaServices.FindAll();

            return(View(categoryList));
        }
Ejemplo n.º 2
0
 public IActionResult Create()
 {
     ViewBag.Categorias = _categoriaServices.FindAll().Select(a => new SelectListItem(a.Descricao, a.Id.ToString()));
     return(View());
 }