Exemplo n.º 1
0
 public bool RemoveFeed(int id)
 {
     try
     {
         DBFeed feed = uow.Feeds.FindById(id);
         uow.Feeds.Remove(feed);
         uow.Save();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 public bool AddFeedToCollection(int collectionId, Feed feed)
 {
     try
     {
         DBContentCollection contentCollection = uow.ContentCollections.FindById(collectionId);
         DBFeed newFeed = new DBFeed {
             URL = feed.URL, ContentCollection = contentCollection
         };
         uow.Feeds.Create(newFeed);
         uow.Save();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }