Actor dependency injection & scoping
Open
question
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
## Ask your question here
I'm trying to understand the scoping of an actor's lifetime and how it maps to my dependencies.
We have an API controller that uses correlation that we want to pass to the actor. We are using as scoped dependency but based on [the DI docs](https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-actors/dotnet-actors-usage/#using-dependency-injection) I understood that the scope of an actor is the actor lifetime and thus it would receive a different instance than our API controller.
Is there a way to have the same dependency instance or not?
Contributor guide
Assessment
This issue has not been assessed yet.