-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Internals documentation for the internal service provider #2066
Conversation
@aspnet/efteam This is the start of work on internals/architecture documentation. I'm doing this in a feature branch because I'm not sure what the overall structure will look like until I have more content. All links are currently just placeholders for where I want to link to something. |
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.
Great to see this starting... Am sure I'll have more to say once this is in context with other internal docs.
One thought - this seems to be a more general article about services in EF Core, and not just about the internal service provider (which seems like a subset of that).
@@ -0,0 +1,166 @@ | |||
--- | |||
title: The internal service provider - EF Core |
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.
Nit: I think we capitalize our top-level titles
uid: core/internals/internal-service-provider | ||
--- | ||
|
||
# The internal service provider |
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.
Same nit re capitalization
* [Singleton]() services are shared between DbContext instances | ||
* [Scoped]() services are shared within, but not between, DbContext instances | ||
|
||
A DbContext instance typically represents a [session]() or [unit-of-work](). |
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.
Maybe say a word about DI scopes at the beginning of this section before going into DbContext etc.?
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.
What I'm hoping here is that I can find links to these concepts in the D.I. documentation. I decided not to try to describe D.I. in general here. Depending what I find to link to I will revisit this.
Likewise, some changes in context configuration require different service implementations. | ||
For example, [changing the database provider]() requires different implementations for many services. | ||
|
||
These additional service providers are cached automatically. |
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.
Go into ISingletonOptions here or is it too much? Am worried this is a bit too abstract for newbies.
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.
I think that should go into a different page--I created a list of possible things to cover here: #1920
Closing for now; will bring it back in a new format later. |
No description provided.