public bool AddCategory(CategoriesSlidersDTO categories) { return(_categoriesSliderRepository.Add(new CategoriesSliders() { CategoryId = categories.CategoryId, GalleryId = categories.GalleryId })); }
public bool DeleteCategory(CategoriesSlidersDTO categories) { var category = _categoriesSliderRepository.First(x => x.Id == categories.Id); if (category != null) { _categoriesSliderRepository.Delete(category); return(true); } return(false); }