Beispiel #1
0
 public static MongoDbManager GetInstance()
 {
     if (_instance == null)
     {
         _instance = new MongoDbManager();
     }
     return(_instance);
 }
Beispiel #2
0
        public static IDbManager GetInstance(string dbName)
        {
            switch (dbName)
            {
            case "inmemory":
                return(InMemoryManager.GetInstance());

            case "mongo":
                return(MongoDbManager.GetInstance());

            default:
                throw new Exception("Invalid Database");
            }
        }