public IndexModel(ILogger <IndexModel> logger, Domain.IProductManager productManager) { _logger = logger; _productManager = productManager; var categories = _productManager.GetCategories(); logger.LogDebug(categories.Count().ToString()); }
public IViewComponentResult Invoke() { var categories = _productManager.GetCategories(); return(View(categories)); }