예제 #1
0
        public void Delete(ArticleImage Obj)
        {
            Model.Local.AttributeArticleImageRepository AttributeArticleImageRepository = new AttributeArticleImageRepository();
            AttributeArticleImageRepository.DeleteAll(AttributeArticleImageRepository.ListImageArticle(Obj.ImaArt_Id));
            Model.Local.CompositionArticleImageRepository CompositionArticleImageRepository = new CompositionArticleImageRepository();
            CompositionArticleImageRepository.DeleteAll(CompositionArticleImageRepository.ListImageArticle(Obj.ImaArt_Id));

            this.DBLocal.ArticleImage.DeleteOnSubmit(Obj);
            this.Save();
        }
예제 #2
0
 public void DeleteAll(List <ArticleImage> list)
 {
     foreach (var Obj in list)
     {
         Model.Local.AttributeArticleImageRepository AttributeArticleImageRepository = new AttributeArticleImageRepository();
         AttributeArticleImageRepository.DeleteAll(AttributeArticleImageRepository.ListImageArticle(Obj.ImaArt_Id));
         Model.Local.CompositionArticleImageRepository CompositionArticleImageRepository = new CompositionArticleImageRepository();
         CompositionArticleImageRepository.DeleteAll(CompositionArticleImageRepository.ListImageArticle(Obj.ImaArt_Id));
     }
     this.DBLocal.ArticleImage.DeleteAllOnSubmit(list);
     this.Save();
 }