/// <summary> /// Deletes the UI templates associated with the current gallery. /// </summary> private void DeleteUiTemplates() { using (var repo = new UiTemplateRepository()) { foreach (var dto in repo.Where(m => m.FKGalleryId == GalleryId)) { repo.Delete(dto); } repo.Save(); } }
/// <summary> /// Permanently delete the current UI template from the data store. This action cannot be undone. /// </summary> public void Delete() { using (var repo = new UiTemplateRepository()) { var uiTmplDto = repo.Find(UiTemplateId); if (uiTmplDto != null) { repo.Delete(uiTmplDto); repo.Save(); } } CacheController.RemoveCache(CacheItem.UiTemplates); }
/// <summary> /// Permanently delete the current UI template from the data store. This action cannot be undone. /// </summary> public void Delete() { using (var repo = new UiTemplateRepository()) { var uiTmplDto = repo.Find(UiTemplateId); if (uiTmplDto != null) { repo.Delete(uiTmplDto); repo.Save(); } } Factory.ClearAllCaches(); }