コード例 #1
0
ファイル: ColumnInfo.cs プロジェクト: wangpei421/DTE
 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);
 }
コード例 #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);
        }
コード例 #3
0
ファイル: DTEFactory.cs プロジェクト: wangpei421/DTE
        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);
        }
コード例 #4
0
 public ConnectionFactory(SupportedConnectionsTypes connectionType, string connectionString)
 {
     ConnectionType   = connectionType;
     ConnectionString = connectionString;
 }
コード例 #5
0
 public DTECore(SupportedConnectionsTypes type, string connection_String, ISettings settings)
 {
     _settings  = settings;
     DTEService = DteCoreFactory.CreateDTECore(type, connection_String);
 }