private static DbDriver CreateDbDriver(DbDialect dialectClass, string name, string driverClassName, string connectionString, string dbProviderFactoryName, string act, string auto) { var autoScheme = AutoScheme.None; if (auto.IsNullOrEmpty()) { if (!string.IsNullOrEmpty(act)) { if (bool.Parse(act)) { autoScheme = AutoScheme.CreateTable; } } } else { autoScheme = (AutoScheme)Enum.Parse(typeof(AutoScheme), auto); } CheckProperty(dialectClass, connectionString); if (driverClassName == "") { return(dialectClass.CreateDbDriver(name, connectionString, dbProviderFactoryName, autoScheme)); } return((DbDriver)ClassHelper.CreateInstance(driverClassName, dialectClass, name, connectionString, dbProviderFactoryName, autoScheme)); }
private static DbDriver CreateDbDriver(DbDialect dialectClass, string name, string driverClassName, string connectionString, string dbProviderFactoryName, string das) { var autoScheme = das.ToEnum <AutoScheme>(); CheckProperty(dialectClass, connectionString); if (driverClassName == "") { return(dialectClass.CreateDbDriver(name, connectionString, dbProviderFactoryName, autoScheme)); } return((DbDriver)ClassHelper.CreateInstance(driverClassName, dialectClass, name, connectionString, dbProviderFactoryName, autoScheme)); }