public async Task <IActionResult> Index([FromServices] TengoDbContext db, PageInfo pageInfo, List <int> categoryID = null, string keyword = null, string sortBy = null) { ViewBag.Keyword = keyword; ViewBag.CategoryId = categoryID; ViewBag.Category = await db.Category.ToListAsync(); ViewBag.Goods = await service.PageList(pageInfo, categoryID, keyword, sortBy); return(View()); }