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)); } }
public int AddEntry(Internal.LiteDbCacheEntry entry) { using (var db = new PersistentLiteDatabase(_ConnectionString)) { var collection = db.GetCollection <Internal.LiteDbCacheEntry>(_CollectionName); return(collection.Insert(entry).AsInt32); } }