Ejemplo n.º 1
0
 public void Dispose()
 {
     StaticDocumentDatabase.DisposeDatabaseEngine();
     DB.Dispose();
     DB = null;
     currentCollection = null;
 }
Ejemplo n.º 2
0
 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);
 }