Example #1
0
        public virtual ServiceMethodList FetchMethods(DbSource dbSource)
        {
            switch (dbSource.ServerType)
            {
            case enSourceType.MySqlDatabase:
            {
                var broker = new MySqlDatabaseBroker();
                return(broker.GetServiceMethods(dbSource));
            }

            case enSourceType.PostgreSQL:
            {
                var broker = new PostgreSqlDataBaseBroker();
                return(broker.GetServiceMethods(dbSource));
            }

            case enSourceType.Oracle:
            {
                var broker = new OracleDatabaseBroker();
                return(broker.GetServiceMethods(dbSource));
            }

            case enSourceType.SQLiteDatabase:
            {
                var broker = new SqliteDatabaseBroker();
                return(broker.GetServiceMethods(dbSource));
            }

            default:
            {
                var broker = CreateDatabaseBroker();
                return(broker.GetServiceMethods(dbSource));
            }
            }
        }
Example #2
0
     public virtual ServiceMethodList FetchMethods(DbSource dbSource)
     {
         switch(dbSource.ServerType)
         {
                 case enSourceType.MySqlDatabase:
             {
                 var broker = new  MySqlDatabaseBroker();
                 return broker.GetServiceMethods(dbSource);
             }
             default:
             {
                         var broker = CreateDatabaseBroker();
                     return broker.GetServiceMethods(dbSource);
             }
         }
 
     }