Answer the question
In order to leave comments, you need to log in
How to figure out which service with which life cycle should be applied?
I have IPersonRepository repository services etc. Also a container for storing all instances in memory (an in-memory container in the form of an IList).
There is also a service that generates a pin code and a service that calculates the amount of money on all user accounts and uses the user's repository as an argument in the constructor.
How to determine which of these services will have which life cycle (Scoped, Singltone or Transient).
I know the definitions for these cycles, but I don’t understand which one can or cannot be used.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question