示例#1
0
        public INLORMDb GetDb(string ConnectString, SupportedDb dbType)
        {
            switch (dbType)
            {
            case SupportedDb.MSSQL:
                return(new NLORMMSSQLDb(ConnectString));

            case SupportedDb.SQLITE:
                return(new NLORMSQLiteDb(ConnectString));

            case SupportedDb.MYSQL:
                return(new NLORMMySqlDb(ConnectString));

            default:
                throw new NLORMException("N", "Not SupportDB");
            }
        }
示例#2
0
        public IMicroORMDb GetDb(string ConnectString, SupportedDb dbType)
        {
            switch (dbType)
            {
            case SupportedDb.MSSQL:
                return(new MicroORMMsSqlDb(ConnectString));

            case SupportedDb.POSTGRESQL:
                return(null);

            //return new MicroORMPostgreSqlDb(ConnectString);
            case SupportedDb.MYSQL:
                //return null;
                return(new MicroORMMySqlDb(ConnectString));

            default:
                throw new MicroORMException("N", "Not SupportDB");
            }
        }
示例#3
0
文件: Manager.cs 项目: kangbudz/NLORM
 public static INLORMDb GetDb(string connectionString, SupportedDb dbType)
 {
     return(NLORMFactory.Instance.GetDb(connectionString, dbType));
 }