Пример #1
0
 public bool AddCategory(CategoriesSlidersDTO categories)
 {
     return(_categoriesSliderRepository.Add(new CategoriesSliders()
     {
         CategoryId = categories.CategoryId,
         GalleryId = categories.GalleryId
     }));
 }
Пример #2
0
        public bool DeleteCategory(CategoriesSlidersDTO categories)
        {
            var category = _categoriesSliderRepository.First(x => x.Id == categories.Id);

            if (category != null)
            {
                _categoriesSliderRepository.Delete(category);
                return(true);
            }

            return(false);
        }