Exemplo n.º 1
0
        public static void Read(
            Dictionary <string, UserTable> userTables,
            Dictionary <string, PrimaryKeyColumn> primaryKeyColumns,
            IDataReader reader)
        {
            var factory = new PrimaryKeyFactory(reader);

            while (reader.Read())
            {
                factory.CreatePrimaryKey(userTables, primaryKeyColumns, reader);
            }
        }
Exemplo n.º 2
0
        public static async Task ReadAsync(
            Dictionary <string, UserTable> userTables,
            Dictionary <string, PrimaryKeyColumn> primaryKeyColumns,
            DbDataReader reader,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            var factory = new PrimaryKeyFactory(reader);

            while (await reader.ReadAsync(cancellationToken))
            {
                cancellationToken.ThrowIfCancellationRequested();
                factory.CreatePrimaryKey(userTables, primaryKeyColumns, reader);
            }
        }