Move IOperationReporter, ISnapshotModelProcessor and SnapshotModelProcessor to EFCore.Relational#38408
Open
Copilot wants to merge 6 commits into
Open
Move IOperationReporter, ISnapshotModelProcessor and SnapshotModelProcessor to EFCore.Relational#38408Copilot wants to merge 6 commits into
Copilot wants to merge 6 commits into
Conversation
…sor to EFCore.Relational Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Move some Design services to Relational
Move IOperationReporter, ISnapshotModelProcessor and SnapshotModelProcessor to EFCore.Relational
Jun 11, 2026
There was a problem hiding this comment.
Pull request overview
This PR relocates key design-time migration snapshot services (IOperationReporter, ISnapshotModelProcessor, SnapshotModelProcessor) into EFCore.Relational so relational providers (which commonly reference EFCore.Relational but not EFCore.Design) can derive from/override snapshot processing for provider-specific fixups.
Changes:
- Moved
IOperationReporterand snapshot processing abstractions/implementation intoEFCore.Relational(namespaces preserved to avoid churn). - Moved the
MultipleAnnotationConflictresource fromDesignStringstoRelationalStringsand updated usages/tests accordingly. - Updated build/test infrastructure references (linked-source path in
ef.csproj, explicitEFCore.Relationalreference in specification tests) and updated the migrations agent skill doc.
Reviewed changes
Copilot reviewed 7 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/EFCore.Specification.Tests/EFCore.Specification.Tests.csproj | Adds explicit EFCore.Relational reference needed due to non-transitive test setup. |
| test/EFCore.Design.Tests/Migrations/Design/SnapshotModelProcessorTest.cs | Updates expected warning message source from DesignStrings to RelationalStrings. |
| src/EFCore.Relational/Properties/RelationalStrings.resx | Adds MultipleAnnotationConflict resource to Relational. |
| src/EFCore.Relational/Properties/RelationalStrings.Designer.cs | Adds the strongly-typed accessor for MultipleAnnotationConflict. |
| src/EFCore.Relational/Migrations/Internal/SnapshotModelProcessor.cs | Switches warning string source to RelationalStrings and adds EF1001 suppression where needed. |
| src/EFCore.Relational/Migrations/Internal/ISnapshotModelProcessor.cs | Introduces the snapshot processor abstraction in Relational for provider overrides. |
| src/EFCore.Relational/Design/Internal/IOperationReporter.cs | Introduces IOperationReporter in Relational for broader provider accessibility. |
| src/EFCore.Design/Properties/DesignStrings.resx | Removes MultipleAnnotationConflict resource from Design. |
| src/EFCore.Design/Properties/DesignStrings.Designer.cs | Removes the strongly-typed accessor for MultipleAnnotationConflict. |
| src/ef/ef.csproj | Updates linked-source path for IOperationReporter to point to Relational. |
| .agents/skills/migrations/SKILL.md | Updates internal agent documentation to reflect the new locations/registration behavior. |
Files not reviewed (2)
- src/EFCore.Design/Properties/DesignStrings.Designer.cs: Language not supported
- src/EFCore.Relational/Properties/RelationalStrings.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)
src/EFCore.Relational/Migrations/Internal/SnapshotModelProcessor.cs:7
using Microsoft.EntityFrameworkCore.Diagnostics;is redundant here because EFCore.Relational already provides this namespace via global<Using Include="Microsoft.EntityFrameworkCore.Diagnostics" />in EFCore.Relational.csproj. Keeping it will typically trigger IDE0005 (unnecessary using) under analyzers.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
AndriySvyryd
approved these changes
Jun 11, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 11 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- src/EFCore.Design/Properties/DesignStrings.Designer.cs: Language not supported
- src/EFCore.Relational/Properties/RelationalStrings.Designer.cs: Language not supported
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37293
Relational providers reference
EFCore.Relationalbut notEFCore.Design, so they could not derive fromSnapshotModelProcessoror register a customISnapshotModelProcessorfor provider-specific snapshot fixups. This relocates those design-time services down toEFCore.Relational.Type moves (namespaces preserved → no
usingchurn)IOperationReporter→EFCore.Relational/Design/Internal/ISnapshotModelProcessor,SnapshotModelProcessor→EFCore.Relational/Migrations/Internal/OperationReporterandIOperationReportHandlerstay inEFCore.Design(Design-only concerns).Supporting changes
MultipleAnnotationConflictresource fromDesignStringstoRelationalStrings(the processor can no longer reachDesignStrings).#pragma warning disable EF1001around internalModel/ModelExtensionsusage, since the EF analyzer runs inEFCore.Relational(it does not inEFCore.Design).ef.csprojand added an explicitEFCore.Relationalreference toEFCore.Specification.Tests(which disables transitive references).The default registration stays a
TryAddinDesignTimeServiceCollectionExtensions, which runs after provider design-time services — so a provider override now wins: