Beispiel #1
0
        private static FfdbEngine GetConfiguredMongoEngine()
        {
            var setup = new EngineSetup();

            setup.UseMongo(new MongoConfig
            {
                ConnectionString = "mongodb://localhost:27017/FFDB_Test_2?replicaSet=rs_local",
                DatabaseName     = "FFDB_Test_3"
            });

            return(GetConfiguredEngine(setup));
        }
Beispiel #2
0
        internal static EngineSetup ConfigureDbProvider(this EngineSetup setup, FfdbConfig config)
        {
            if (config.PostgreSql != null)
            {
                setup.UsePostgreSql(config.PostgreSql);
            }
            else if (config.Mongo != null)
            {
                setup.UseMongo(config.Mongo);
            }

            return(setup);
        }