Exemple #1
0
        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);
        }
Exemple #2
0
 public bool DestroyCategory(string bvin)
 {
     return(CatalogServices.DestroyCategory(bvin));
 }