private void DeleteSimple(Category category) { category.IsDeleted = true; urlSlugService.Remove(category.Id, CategoryEntityName); foreach (var childCategory in category.Child) { DeleteSimple(childCategory); } }
public void Update(Product product) { var slug = _urlSlugService.Get(product.Id, ProductEntityTypeId); if (product.IsVisibleIndividually) { if (slug != null) { _urlSlugService.Update(product.SeoTitle, product.Id, ProductEntityTypeId); } else { _urlSlugService.Add(product.SeoTitle, product.Id, ProductEntityTypeId); } } else { if (slug != null) { _urlSlugService.Remove(product.Id, ProductEntityTypeId); } } _productRepository.SaveChange(); }
public void Delete(Page page) { _pageRepository.Remove(page); _urlSlugService.Remove(page.Id, PageEntityTypeId); _pageRepository.SaveChange(); }
public void Delete(Brand brand) { brand.IsDeleted = true; _urlSlugService.Remove(brand.Id, BrandEntityTypeId); _brandRepository.SaveChange(); }
public void Delete(Product product) { product.SetDelete(true); urlSlugService.Remove(product.Id, ProductEntityName); productRepository.SaveChange(); }
public void Delete(Page page) { pageRepository.Remove(page); urlSlugService.Remove(page.Id, PageEntityName); pageRepository.SaveChange(); }