private void SetupDatabase(IApplicationConfiguration configuration) { var mongourl = new MongoUrl(configuration.GetConnectionString("MongoDB")); var client = new MongoClient(mongourl); database = client.GetDatabase(mongourl.DatabaseName); }
public EventStoreConnectionString(string connectionStringName, IApplicationConfiguration configuration) { var connectionString = configuration.GetConnectionString(connectionStringName); var options = connectionString .Split(';') .Select(x => new ConnectionPart(x)) .ToDictionary(x => x.Name, x => x.Value); _connectionOptions = new ConnectionOptions(options, connectionStringName); }