public void CreateDatabaseAndViews() { _applicationSettingsCollection = new CouchDbStore <ApplicationSettings>(ApplicationSettings.CouchDbUrl); _applicationSettingsCollection.CreateDatabase().GetAwaiter().GetResult(); _applicationSettingsCollection.CreateDesignDocument().GetAwaiter().GetResult(); _applicationSettingsCollection.CreateView("applicationsettings").GetAwaiter().GetResult(); }
public void CreateDatabaseAndViews() { _tokenCollection = new CouchDbStore <Token>(ApplicationSettings.CouchDbUrl); _tokenCollection.CreateDatabase().GetAwaiter().GetResult(); _tokenCollection.CreateDesignDocument().GetAwaiter().GetResult(); _tokenCollection.CreateView("token").GetAwaiter().GetResult(); _tokenCollection.CreateView("token", "accountid", "doc.accountid").GetAwaiter().GetResult(); }
public void CreateDatabaseAndViews() { _accountCollection = new CouchDbStore <Account>(ApplicationSettings.CouchDbUrl); _accountCollection.CreateDatabase().GetAwaiter().GetResult(); _accountCollection.CreateDesignDocument().GetAwaiter().GetResult(); _accountCollection.CreateView("account").GetAwaiter().GetResult(); _accountCollection.CreateView("account", "email", "doc.email").GetAwaiter().GetResult(); _accountCollection.CreateView("account", "username", "doc.username").GetAwaiter().GetResult(); }