Skip to content
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

add info on context registration #5618

Draft
wants to merge 2 commits into
base: main
Choose a base branch
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 😔

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
4 participants