protected override void CheckIsBeingUsed(Models.View item) { if (!item.HasParentVersion() && Relations(item).Count() > 0) { throw new KoobooException(string.Format("'{0}' is being used.".Localize(), item.Name)); } }
public override void Remove(Site site, Models.View o) { o.Site = site; if (!o.HasParentVersion() && RelationsPages(o).Where(i => i.Site == site).Count() > 0) { throw new KoobooException(string.Format("'{0}' is being used".Localize(), o.Name)); } base.Remove(site, o); }