public void Store(RemoteWebsiteData data)
 {
     using (var db = new LiteDatabase(DbPath))
     {
         var htmlCollection = db.GetCollection <RemoteWebsiteData>(HtmlCollectionName);
         htmlCollection.Upsert(data);
         htmlCollection.EnsureIndex(d => d.Source);
     }
 }
Exemple #2
0
        public void UpdateData(Cinema source, HtmlDocument data)
        {
            var remoteData = new RemoteWebsiteData
            {
                Source  = source,
                Data    = data.Text,
                Updated = DateTime.Now
            };

            HtmlRepository.Store(remoteData);
        }