Ejemplo n.º 1
0
        public SqlTableReader(DatabaseSource source, int offset = 0, int fetchCount = 0, DataSourceParameters parameters = null)
            : base(source.ToString(), offset, fetchCount)
        {
            Argument.IsNotNull(() => source);

            _databaseSource   = source;
            _totalRecordCount = 0;
            QueryParameters   = parameters;
        }
        public static IList <DbObject> GetObjectsOfType(this DatabaseSource databaseSource, TableType tableType)
        {
            Argument.IsNotNull(() => databaseSource);

            var dataSourceCopy = new DatabaseSource(databaseSource.ToString())
            {
                TableType = tableType
            };

            var gateway = dataSourceCopy.CreateGateway();

            return(gateway?.GetObjects() ?? new List <DbObject>());
        }