-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix design-time services documentation for EF Core 6.0+ #5119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix design-time services documentation for EF Core 6.0+ #5119
Conversation
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
... validate samples Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
...ion, add provider services Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@copilot Add a note to the compiled model docs that CSharpHelper.ShouldUseFullName can be overridden to return true to avoid compilation errors due to ambiguous references. And link to core/cli/services on how to do it
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@copilot Add a note to the compiled model docs that
CSharpHelper.ShouldUseFullNamecan be overridden to returntrueto avoid compilation errors due to ambiguous references. And link to `core/cli/s...
Added documentation in commit ab5b232:
-
In compiled models documentation (advanced-performance-topics.md): Added a new section "Handling compilation errors due to ambiguous type references" that explains the issue and links to the design-time services documentation.
-
In design-time services documentation (services.md): Added a "Customizing individual services" section with a complete example showing how to override
CSharpHelper.ShouldUseFullNameto returntrueto always use fully-qualified type names.
Both documents now cross-reference each other to provide users with the information they need to resolve ambiguous type reference compilation errors.
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@copilot Update progress by creating a summary of all changes in this PR
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@copilot Update progress by creating a summary of all changes in this PR
Summary of Changes
This PR fixes outdated design-time services documentation for EF Core 6.0+ (issues #3390 and #4013).
Files Modified (4 files, +50/-9 lines)
1. samples/core/Miscellaneous/CommandLine/CustomTools.cs
- Added provider-specific design-time services registration (required for EF Core 6.0+)
- Added missing
using System;for Activator class - Changed from
UseSqlServertoUseSqliteto match project dependencies - Updated service registration order: DbContext services → provider services → core design-time services
2. entity-framework/core/cli/services.md
- Updated service list from 10 to 23+ services (added ICandidateNamingService, ICSharpMigrationOperationGenerator, ICompiledModelCodeGenerator, IPrecompiledQueryCodeGenerator, etc.)
- Updated PackageReference example from version 3.1.9 to 9.0.0
- Updated ms.date to 01/17/2025
3. entity-framework/core/performance/advanced-performance-topics.md
- Added new subsection "Handling compilation errors due to ambiguous type references"
- Documented how to override
CSharpHelper.ShouldUseFullNameto returntrue - Added cross-reference link to design-time services documentation
4. entity-framework/core/miscellaneous/internals/tools.md
- Fixed grammar: "path" → "paths"
Key Fixes
- Issue Design-time services documentation out of date #4013 : Fixed broken CustomTools.cs sample that returned null for
IMigrationsScaffolderin .NET 6.0+ - Issue Update Design-time services #3390 : Updated design-time services list to match current EF Core implementation
- All samples verified to compile successfully
Uh oh!
There was an error while loading. Please reload this page.
Summary of Changes
This PR fixes outdated design-time services documentation for EF Core 6.0+ (issues #3390 and #4013).
Files Modified
1.
samples/core/Miscellaneous/CommandLine/CustomTools.csusing System;for Activator classUseSqlServertoUseSqliteto match project dependencies2.
entity-framework/core/cli/services.md3.
entity-framework/core/performance/advanced-performance-topics.mdCSharpHelper.ShouldUseFullNameto returntrue4.
entity-framework/core/miscellaneous/internals/tools.mdFixes #4013
Fixes #3390
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a 200ドル gift card! Click here to start the survey.