public bool DestroyAllCategories() { var current = DateTime.UtcNow; var availableUntil = CurrentRequestContext.CurrentStore.Settings.AllowApiToClearUntil; var compareResult = DateTime.Compare(current, availableUntil); if (compareResult >= 0) { return(false); } var all = CatalogServices.Categories.FindAll(); foreach (var snap in all) { CatalogServices.DestroyCategory(snap.Bvin); } return(true); }
public bool DestroyCategory(string bvin) { return(CatalogServices.DestroyCategory(bvin)); }