Skip to content

Do we need to use [ScopedService] for services registered using AddScoped in DI? #3117

Answered by michaelstaib
gojanpaolo asked this question in Q&A
Discussion options

You must be logged in to vote

The [ScopedServiceAttribute] marks resolver scoped services. These are services that are stored on the scoped context data.

if you just want to access a standard scoped server from the DI either use [Service] or [FromServices].

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gojanpaolo
Comment options

Answer selected by gojanpaolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants