Exemplo 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));
     }
 }
Exemplo 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);
     }
 }