Exemple #1
0
        public void deleteALL(ZentityContext context)
        {
            ArrayList l = new ArrayList();
            foreach (ImageResource2 img in context.Resources.OfType<ImageResource2>())
            {
                foreach (Zentity.Core.File f in img.Files)
                {
                    context.DeleteResourceHasFile(img.Id, f.Id);
                    context.DeleteResourceHasFile(f.Id, img.Id);

                    context.DeleteResource(f.Id);
                }
                l.Add(img.Id);
            }
            foreach (Guid g in l)
                context.DeleteResource(g);
        }