-
Couldn't load subscription status.
- Fork 2k
Document ConfigureDbContext method and AddDbContext precedence changes in EF Core 8.0 #5118
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
base: live
Are you sure you want to change the base?
Conversation
… 8.0 Co-authored-by: AndriySvyryd <[email protected]>
Co-authored-by: AndriySvyryd <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gh.io/copilot-coding-agent-docs Update progress by changing the PR description to a nicely formatted summary of the changes that includes fixing #4923
entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md
Outdated
Show resolved
Hide resolved
entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md
Outdated
Show resolved
Hide resolved
entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md
Outdated
Show resolved
Hide resolved
entity-framework/core/what-is-new/ef-core-8.0/breaking-changes.md
Outdated
Show resolved
Hide resolved
…nd improve breaking changes Co-authored-by: AndriySvyryd <[email protected]>
Updated PR description with a nicely formatted summary that includes fixing both issues #4588 and #4923. |
Co-authored-by: AndriySvyryd <[email protected]>
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Outdated
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Show resolved
Hide resolved
… remove BlogContext region, adjust endregion placement Co-authored-by: AndriySvyryd <[email protected]>
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Show resolved
Hide resolved
…ppets Co-authored-by: AndriySvyryd <[email protected]>
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample.cs
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample.cs
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/Program.cs
Outdated
Show resolved
Hide resolved
.../Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample/ConfigureDbContextSample.csproj
Outdated
Show resolved
Hide resolved
…te sample directory Co-authored-by: AndriySvyryd <[email protected]>
samples/core/Miscellaneous/ConfiguringDbContext/ConfiguringDbContext.csproj
Show resolved
Hide resolved
samples/core/Miscellaneous/ConfiguringDbContext/ConfigureDbContextSample.cs
Outdated
Show resolved
Hide resolved
…o net9.0 Co-authored-by: AndriySvyryd <[email protected]>
Co-authored-by: AndriySvyryd <[email protected]>
|
|
||
| <a name="configuredbcontext"></a> | ||
|
|
||
| ## ConfigureDbContext for configuration composition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely doesn't seem like the first thing to document on this page, above "Basic DbContext initialization with 'new'". IIUC (and as documented), ConfigureDbContext is for reusable libraries/components (like Aspire), and so is not an end-user API. As such it maybe merits a short note at the very bottom, but nothing like this at the very top - this would confuse any beginner user coming here.
(FWIW I don't remember any user requesting something like this for tests, as documented - this would have to be a very advanced/elaborate scenario. Even we've managed fine without it.)
This PR documents the
ConfigureDbContextmethod and clarifies the breaking change in EF Core 8.0 regarding multipleAddDbContextcalls.Overview
This PR addresses two related issues:
Breaking Changes Documentation (EF Core 8.0)
Enhanced the breaking changes documentation for multiple
AddDbContextcalls with:ConfigureDbContextmethod, with a link to detailed documentationConfigureDbContextmethod (EF Core 9.0+)ConfigureDbContext Documentation (EF Core 9.0)
Added comprehensive documentation for the
ConfigureDbContextmethod introduced in EF Core 9.0:Key Capabilities
ConfigureSqlEngineDocumentation Includes
ConfigureDbContextmethodSample Code
ConfigureDbContextSampleTechnical Clarifications
AddDbContextcalls now use last-wins precedence (changed in EF Core 8.0)ConfigureDbContextmethodFixes #4588
Fixes #4923
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.