public IActionResult Index(QueryOption options)
 {
     //ViewBag.categories = crepository.Categories;
     return(View(reprository.GetProducts(options)));
 }
 public IActionResult Index([FromQuery(Name = "options")] QueryOption productOptions, QueryOption categoryOptions, int categoryId)
 {
     ViewBag.Categories       = categoryRepository.GetCategories(categoryOptions);
     ViewBag.SelectedCategory = categoryId;
     return(View(productRepositorty.GetProducts(productOptions, categoryId)));
 }