/// <summary> /// Seed /// </summary> /// <returns></returns> public async Task TearDown() { _logger.LogInformation("Tearing Down Database..."); var connectionSettings = new LocationConnectionSettings( new Uri(_settings.Value.URL), _settings.Value.PrimaryKey, _settings.Value.DatabaseId); var client = _service.CreateClient(connectionSettings, false); try { await client.DeleteDatabaseAsync($"dbs/{_settings.Value.DatabaseId}"); } catch (DocumentClientException documentClientException) { _logger.LogError(documentClientException.Message); _logger.LogError(documentClientException.StackTrace); } _logger.LogInformation($" Torn down."); }
private IDocumentClient GetClient(IClientSettings connectionSettings) { return(_documentClientFactory.CreateClient(connectionSettings, _bypassSsl)); }