Esempio n. 1
0
        public ReferenceDataFeedReader(ILastReadFeedItemDAO lastReadFeedItemDao, AtomFeed atomfeed)
        {
            _lastReadFeedItemDao = lastReadFeedItemDao;
            _atomfeed            = atomfeed;

            _lastReadFeedItem = _lastReadFeedItemDao.FindByFeedId(atomfeed.Id);
            if (_lastReadFeedItem == null)
            {
                using (var scope = _lastReadFeedItemDao.BeginTransaction())
                {
                    _lastReadFeedItem = _lastReadFeedItemDao.Add(new LastReadFeedItem(atomfeed.Id, Guid.Empty));
                    scope.Commit();
                }
            }
        }
 public void Update(LastReadFeedItem productReference)
 {
     _db.LastReadFeedItem.UpdateById(productReference);
 }
 private static LastReadFeedItem GetLastReadFeed()
 {
     return s_foundFeed ?? (s_foundFeed = s_dao.FindByFeedId(s_newFeed.FeedId));
 }
 public LastReadFeedItem Add(LastReadFeedItem lastReadFeedItem)
 {
     return _db.LastReadFeedItem.Insert(lastReadFeedItem);
 }