Esempio n. 1
0
 public ColumnInfo(DataTable dt, DataColumn column, SupportedConnectionsTypes connectionType)
 {
     this.ColumnName = column.ColumnName;
     this.Type       = column.DataType;
     this.Nullable   = column.AllowDBNull;
     this.Extra      = column.AutoIncrement;
     this.Def        = column.DefaultValue.ToString();
     this.Key        = dt.PrimaryKey.Select(x => x.ColumnName).ToList().Contains(column.ColumnName);
 }
Esempio n. 2
0
        public static IConnectionBuilder CreateConnectionBuilder(SupportedConnectionsTypes connectionType, string connectionString = "")
        {
            switch (connectionType)
            {
            case SupportedConnectionsTypes.MariaDB:
                break;

            case SupportedConnectionsTypes.MySQL:
                return(new MySQLConnectionBuilder(connectionString));

            case SupportedConnectionsTypes.MSSQL:
                return(new MSSQLConnectionBuilder(connectionString));

            case SupportedConnectionsTypes.PostgreSQL:
                break;
            }

            return(null);
        }
Esempio n. 3
0
        public static IDTE CreateDTECore(SupportedConnectionsTypes type, string connection_string)
        {
            switch (type)
            {
            case SupportedConnectionsTypes.MariaDB:
                break;

            case SupportedConnectionsTypes.MySQL:
                return(new MySQLDAL(connection_string));

            case SupportedConnectionsTypes.MSSQL:
                return(new MSSQLDAL(connection_string));

            case SupportedConnectionsTypes.PostgreSQL:
                break;

            default:
                break;
            }
            return(null);
        }
Esempio n. 4
0
 public ConnectionFactory(SupportedConnectionsTypes connectionType, string connectionString)
 {
     ConnectionType   = connectionType;
     ConnectionString = connectionString;
 }
Esempio n. 5
0
 public DTECore(SupportedConnectionsTypes type, string connection_String, ISettings settings)
 {
     _settings  = settings;
     DTEService = DteCoreFactory.CreateDTECore(type, connection_String);
 }