Skip to content

rc.4: deprecate the members that have a better route ([Obsolete] warnings) - #118

Merged
electricessence merged 4 commits into
masterfrom
feat/rc4-obsolete
Nov 11, 2026
Merged

electricessence merged 4 commits into
masterfrom
feat/rc4-obsolete

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

The rc.4 deprecations (API shape): members with a better route get [Obsolete] as a warning, never an error. Every message names the exact replacement, never points at another obsolete member, and ends "Removed in 12." like the existing ones.

Merge after #117. Several messages name reader.Map(...) and command.Map(...), which #117 adds. They are named in plain text only (no cref), so this branch builds on its own.

Marked

  • IDataReader ToList/ToArray/ToImmutableArray(transform) and the sync-transform DbDataReader.ToListAsync(transform) → reader.Map(transform).ToList() and its siblings (ToListAsync(cancellationToken) for the async one). Select and SelectAsync stay, and so does the ValueTask-transform ToListAsync.
  • IExecuteReader ToList/ToArray/ToImmutableArray(transform, behavior) and IterateReader<TEntity, TResult> → .Map(transform).ToList() / .Map(transform).Read(selector); for a non-default CommandBehavior, the ExecuteReader(handler, behavior) form. The IDbCommand IterateReader overloads stay.
  • The three DbCommand sync-transform ToListAsync → command.Map(transform).ToListAsync(cancellationToken); for a CommandBehavior (or useReadAsync: false), the ExecuteReaderAsync(handler, behavior, cancellationToken) form.
  • To<T>(DataTable, map, clearSourceTable), Transformer<T>.Results(DataTable, bool) and the rewritten ResultsFromDataTable message → table.CreateDataReader().Map(map).ToList(), then clear the table yourself.
  • The four token-first MappedQueryExtensions.ReadAsync → the token-last ReadAsync(handler, cancellationToken).
  • Every public type of the SqlClient package → Open.Database.Extensions.MSSqlClient (Microsoft.Data.SqlClient), which has the same API.
  • AddParameterType(this IDbCommand, string, SqlDbType) in both SQL packages → AddParameterType on the SqlCommand.
  • The protected ExpressiveCommandBase.Concat<T> → remaining is null ? [first] : remaining.Prepend(first).

Not marked in this PR (kept for now): items 15, 18 and 19 of the rc.4 list.

Library

  • No library code calls a newly obsolete member except where one obsolete member forwards to another, under a scoped #pragma with a one-line reason; the rest now calls the non-obsolete implementation.
  • PublicAPI files are unchanged (an [Obsolete] attribute does not change the API lines).

Docs and tests

  • whats-new-11.md lists every newly deprecated member with its replacement; the foundation and mapping articles are updated.
  • Tests that still call these members suppress CS0618 per call, with a reason; the deprecation tests cover the new members.
  • Follow-up after rc.4: Map<T>() on a reader or a raw command (MappedReader<T>, MappedCommand<T>) #117 merges: the "after" sample for ResultsFromDataTable and one test replacement still use To<T>(DataTable) (under a pragma), because reader.Map is not on this branch yet. They move to CreateDataReader().Map(map).ToList() then.

Checks

  • Release and Debug builds: 0 warnings, 0 errors. Tests: 9455 of 9455 pass in both. Samples: 96 of 96 checks pass. Style and analyzers: 0 findings. DocFX: 0 warnings.

🤖 Generated with Claude Code

electricessence and others added 4 commits November 10, 2026 16:07
…adAsync, the SqlClient package and two small members

Each [Obsolete] names its replacement and ends with Removed in 12. The docs table lists them.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… call the old members

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…remarks block on To<T>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s row no longer says a null map is refused

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@electricessence
electricessence merged commit 45ae55c into master Nov 11, 2026
2 checks passed
@electricessence
electricessence deleted the feat/rc4-obsolete branch November 11, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant