Esempio n. 1
0
 public bool UpdateEntry(int key, Internal.LiteDbCacheEntry entry)
 {
     using (var db = new PersistentLiteDatabase(_ConnectionString))
     {
         var collection = db.GetCollection <Internal.LiteDbCacheEntry>(_CollectionName);
         return(collection.Update(new BsonValue(key), entry));
     }
 }
Esempio n. 2
0
 public int AddEntry(Internal.LiteDbCacheEntry entry)
 {
     using (var db = new PersistentLiteDatabase(_ConnectionString))
     {
         var collection = db.GetCollection <Internal.LiteDbCacheEntry>(_CollectionName);
         return(collection.Insert(entry).AsInt32);
     }
 }