Skip to content

add info on context registration #5618

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

Closed
wants to merge 2 commits into from

Conversation

jemayn
Copy link
Contributor

@jemayn jemayn commented Nov 8, 2023

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
  • 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 🙂

@jonat123
Copy link
Contributor

@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 😄

@jemayn jemayn marked this pull request as draft November 10, 2023 10:45
@jemayn
Copy link
Contributor Author

jemayn commented Nov 10, 2023

Hey @jonat123

I will get them added, I've also been made aware that this has all changed drastically from v12.3 due to umbraco/Umbraco-CMS#14937 so will do some testing and update.

Marked it as draft for now pending changes.

@jonat123
Copy link
Contributor

@jemayn What is the status of this PR? Are you still planning on testing and updating the PR?

@jemayn
Copy link
Contributor Author

jemayn commented Feb 12, 2024

@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 umbraco/Umbraco-CMS#15186 atm

@jonat123
Copy link
Contributor

Thanks for letting us know 👍

@Zeegaan
Copy link
Member

Zeegaan commented Mar 1, 2024

Think we are good to merge this in when umbraco/Umbraco-CMS#15186 gets merged 😁

@AaronSadlerUK
Copy link
Contributor

@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!

@jemayn
Copy link
Contributor Author

jemayn commented Mar 4, 2024

@AaronSadlerUK we still use the obsolete method.

Nikolaj has described the way to get the same result currently in this comment: umbraco/Umbraco-CMS#14937 (comment)

However, that is not a good solution - and what prompted umbraco/Umbraco-CMS#15186.
So until that has been merged in we are sticking with the obsolete method which still works just fine.

@AaronSadlerUK
Copy link
Contributor

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 😔

@eshanrnh
Copy link
Contributor

eshanrnh commented Jul 1, 2025

Hello all 👋

Are we still waiting for umbraco/Umbraco-CMS#15186 to merge this PR? Additionally, are these updates applicable only to v12, or do they apply to the rest of the versions too?

Please note that since Umbraco v12 has reached its end of life (EOL), the documentation for this version has been removed from the documentation site.

@jemayn
Copy link
Contributor Author

jemayn commented Jul 1, 2025

Hey @eshanrnh

I think we can close this. The documentation on how to register for different contexts is still a bit lacking - as is documentation on why you would use the Umbraco context registration instead of just pure EF Core.

As this has been stale for a while now and I am unsure with how it should be done in v16 and up I will close it.

@jemayn jemayn closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation on working with EF Core across environments & in a separate project from the website
5 participants