예제 #1
0
        private void SetUpMongoConnection()
        {
            if (!String.IsNullOrEmpty(_environment))
            {
                switch (_environment.ToLower())
                {
                case "prod":     // Production
                    MongoDBAccess.SetConnectionString("mongoDB.connection");
                    break;

                case "dev":
                    MongoDBAccess.SetConnectionString("mongoDB.connectionDev");
                    break;

                default:
                    MongoDBAccess.SetConnectionString("mongoDB.connectionDev");
                    break;
                }
            }
            else
            {
                MongoDBAccess.SetConnectionString("mongoDB.connectionDev");
            }
        }