Esempio n. 1
0
 /*Chỉ có 1 action duy nhất là Invoke()*/
 public IViewComponentResult Invoke()
 {
     return(View("Default", _categoryRepo.GetAll()));
 }
Esempio n. 2
0
 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));
        }