/*Chỉ có 1 action duy nhất là Invoke()*/ public IViewComponentResult Invoke() { return(View("Default", _categoryRepo.GetAll())); }
public IActionResult Create() { ViewBag.Category = new SelectList(_categoryBo.GetAll(), "CategoryId", "CategoryName"); ViewBag.Supplier = new SelectList(_supplierBo.GetAll(), "SupplierId", "SupplierName"); return(View()); }
public IActionResult Index() { var data = _categoryBo.GetAll(); return(View(data)); }