public bool RemoveNewsItem(NewsItem news)
 {
     if (news != null)
     {
         NewsItems.Remove(news);
         if (containerDAL.Delete(news.Id))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
 public bool RemoveNewsItem(NewsItem news)
 {
     if (news != null)
     {
         if (_containerDAL.Delete(news.Id))
         {
             int index = NewsItems.FindIndex(i => i.Id == news.Id);
             NewsItems.RemoveAt(index);
             return(true);
         }
     }
     return(false);
 }