public void Dispose() { StaticDocumentDatabase.DisposeDatabaseEngine(); DB.Dispose(); DB = null; currentCollection = null; }
public DocumentStoreDatabaseService(string dbPath, string collectionName) { DB = StaticDocumentDatabase.GetDatabase(dbPath.ToLower() + ".db"); currentCollection = DB.GetCollection <IDbRecord>(collectionName); currentCollection.EnsureIndex(t => t.Id); currentCollection.EnsureIndex(t => t.TextSearchKey); }
public void CreateDb(string dbPath) { DB = StaticDocumentDatabase.GetDatabase(dbPath); }