コード例 #1
0
        public string GenerateEntityMetadata(string tableName)
        {
            const ApplicationConfiguration.DBType dbType = ApplicationConfiguration.DBType.Maximo;


            if (ApplicationConfiguration.IsDB2(dbType))
            {
                return(HandleGeneric(DB2Query, tableName, Db2Delegate));
            }
            if (ApplicationConfiguration.IsMSSQL(dbType))
            {
                return(HandleGeneric(MSSQLQuery, tableName, SQLServerDelegate));
            }
            throw new NotSupportedException();
        }
コード例 #2
0
ファイル: HibernateUtil.cs プロジェクト: lhrolim/softwrench
 public static string HibernateDialect(ApplicationConfiguration.DBType dbtype)
 {
     ApplicationConfiguration.DBMS?dbms = ApplicationConfiguration.ToUse(dbtype);
     if (dbms == ApplicationConfiguration.DBMS.MSSQL)
     {
         return(typeof(NHibernate.Dialect.MsSql2008Dialect).FullName);
     }
     if (dbms == ApplicationConfiguration.DBMS.DB2)
     {
         return(typeof(NHibernate.Dialect.DB2Dialect).FullName);
     }
     if (dbms == ApplicationConfiguration.DBMS.ORACLE)
     {
         return(typeof(NHibernate.Dialect.Oracle10gDialect).FullName);
     }
     if (dbms == ApplicationConfiguration.DBMS.MYSQL)
     {
         return(typeof(NHibernate.Dialect.MySQLDialect).FullName);
     }
     return(typeof(NHibernate.Dialect.MsSql2008Dialect).FullName);
 }
コード例 #3
0
ファイル: HibernateUtil.cs プロジェクト: lhrolim/softwrench
 public static string HibernateDriverName(ApplicationConfiguration.DBType dbtype)
 {
     ApplicationConfiguration.DBMS?dbms = ApplicationConfiguration.ToUse(dbtype);
     if (dbms == ApplicationConfiguration.DBMS.MSSQL)
     {
         return(typeof(NHibernate.Driver.SqlClientDriver).FullName);
     }
     if (dbms == ApplicationConfiguration.DBMS.DB2)
     {
         return(typeof(NHibernate.Driver.DB2Driver).FullName);
     }
     if (dbms == ApplicationConfiguration.DBMS.ORACLE)
     {
         return(typeof(NHibernate.Driver.OracleClientDriver).FullName);
     }
     if (dbms == ApplicationConfiguration.DBMS.MYSQL)
     {
         return(typeof(NHibernate.Driver.MySqlDataDriver).FullName);
     }
     return(typeof(NHibernate.Driver.SqlClientDriver).FullName);
 }