public static MongoDbManager GetInstance() { if (_instance == null) { _instance = new MongoDbManager(); } return(_instance); }
public static IDbManager GetInstance(string dbName) { switch (dbName) { case "inmemory": return(InMemoryManager.GetInstance()); case "mongo": return(MongoDbManager.GetInstance()); default: throw new Exception("Invalid Database"); } }