UmbracoDocs
UmbracoDocs copied to clipboard
add info on context registration
Description
Added documentation on registering the dbcontext in EF Core and Umbraco for different usecases. Fixes #5595
Type of suggestion
- [ ] Typo/grammar fix
- [ ] Updated outdated content
- [X] New content
- [ ] Updates related to a new version
- [ ] Other
Product & version (if relevant)
Umbraco 12
I've moved the existing database.md article in the root of the Extending section into a new database
folder and renamed it database-with-npoco.md
while also adding the new info in that same folder as database-with-efcore.md
to keep them seperated.
Let me know if anything needs changed, been a while since I kept up with the structure and conventions of the Umbraco Docs 🙂
@jemayn Thanks for the PR 😄
Before we review it, could you please make sure the new articles are added in the SUMMARY.md file? That way it will be shown in the navigation 😄
Then we will make sure to review it ASAP 😄
Hey @jonat123
I will get them added, I've also been made aware that this has all changed drastically from v12.3 due to https://github.com/umbraco/Umbraco-CMS/pull/14937 so will do some testing and update.
Marked it as draft for now pending changes.
@jemayn What is the status of this PR? Are you still planning on testing and updating the PR?
@jonat123 it is in a strange state 😅
The PR to obsolete the old way of doing this was merged, but the new way is a lot worse IMO - so we atleast still use the obsolete method. There is a PR under review to improve the new way to be better which hopefully makes it in before the old way is entirely removed..
So awaiting https://github.com/umbraco/Umbraco-CMS/pull/15186 atm
Thanks for letting us know 👍
Think we are good to merge this in when https://github.com/umbraco/Umbraco-CMS/pull/15186 gets merged 😁
@Zeegaan This draft PR does not show how to use the non obsolete way to register the context.
@jemayn can you update the PR to show how to register the context in a non obsolete way?
Thanks!
@AaronSadlerUK we still use the obsolete method.
Nikolaj has described the way to get the same result currently in this comment: https://github.com/umbraco/Umbraco-CMS/pull/14937#issuecomment-1805669857
However, that is not a good solution - and what prompted https://github.com/umbraco/Umbraco-CMS/pull/15186. So until that has been merged in we are sticking with the obsolete method which still works just fine.
Ah gotcha that makes sense...
Although it's rather annoying to do a piece of work knowing I'll have to redo it again soon 😔