Skip to content

Remove SimpleRecordProvider base class; use composition - #2

Merged
nilvon9wo merged 1 commit into
masterfrom
refactor/remove-simple-record-provider
Sep 10, 2026
Merged

nilvon9wo merged 1 commit into
masterfrom
refactor/remove-simple-record-provider

Conversation

@nilvon9wo

Copy link
Copy Markdown
Owner

SimpleRecordProvider<TRecord> was an invented abstract base class with no analog in the Apex original - it existed only to save the IRecordProvider delegation boilerplate for Providers that are nothing but a MasterTemplate.

Deleted it. Every Provider that extended it now implements IRecordProvider directly: a private _template MasterTemplate, PrimaryTargetField and MasterTemplate returning it, and CreateBundle delegating to RecordFactory.CreateBundle - the same shape the bundled ContactDataProvider and AccountDataProvider already used. The Provider layer now has no inheritance.

Converted 17 Providers across Xfty.Test and the Bogus / VectorDatabases* / EntityFrameworkCore test projects. Updated README, CHANGELOG (Unreleased -> Removed), and porting-history.md.

Build clean; full suite green; verify-doc-examples/links pass.

Claude-Session: https://claude.ai/code/session_01RRxXJ1UpTuJLLH8dC1oALJ

`SimpleRecordProvider<TRecord>` was an invented abstract base class with no
analog in the Apex original - it existed only to save the IRecordProvider
delegation boilerplate for Providers that are nothing but a MasterTemplate.

Deleted it. Every Provider that extended it now implements IRecordProvider
directly: a private `_template` MasterTemplate, PrimaryTargetField and
MasterTemplate returning it, and CreateBundle delegating to
RecordFactory.CreateBundle - the same shape the bundled ContactDataProvider
and AccountDataProvider already used. The Provider layer now has no
inheritance.

Converted 17 Providers across Xfty.Test and the Bogus / VectorDatabases* /
EntityFrameworkCore test projects. Updated README, CHANGELOG (Unreleased ->
Removed), and porting-history.md.

Build clean; full suite green; verify-doc-examples/links pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRxXJ1UpTuJLLH8dC1oALJ
@nilvon9wo
nilvon9wo merged commit 475737f into master Sep 10, 2026
2 checks passed
@nilvon9wo
nilvon9wo deleted the refactor/remove-simple-record-provider branch September 10, 2026 00:44
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