Do we need to use [ScopedService] for services registered using AddScoped in DI? #3117
-
The graphql-workshop explained the need to use I looked at the ScopedServiceAttribute and ServiceAttribute source code but there's nothing in it that would describes its behavior Our scoped service implementation basically caches some information derived from the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The if you just want to access a standard scoped server from the DI either use |
Beta Was this translation helpful? Give feedback.
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]
.