public IActionResult Edit(CategoriesOfTheMonth model)
 {
     if (ModelState.IsValid)
     {
         dataManager.CategoriesOfTheMonth.SaveCategoriesOfTheMonth(model);
         return(RedirectToAction(nameof(HomeController.Index), nameof(HomeController).CutController()));
     }
     return(View(model));
 }
 public void SaveCategoriesOfTheMonth(CategoriesOfTheMonth entity)
 {
     context.Entry(entity).State = EntityState.Modified;
     context.SaveChanges();
 }
 public IndexViewModel(IQueryable <MainSliderContent> mainSliderContents, CategoriesOfTheMonth categoriesOfTheMonth, DisplayedProductsViewModel displayedProducts)
 {
     MainSliderContents         = mainSliderContents;
     CategoriesOfTheMonth       = categoriesOfTheMonth;
     DisplayedProductsViewModel = displayedProducts;
 }