Relative Content

Tag Archive for c#.netasp.net-corelazy-evaluation

Using Lazy to store token value in a scoped service in .NET 6

If i have a service that stores a token as a lazy object, and the token is fetched inside a value factory, is that value persisted across multiple requests, or since the underlying service is scoped, lazy starts with a null value for every single request?

Using Lazy to store token value in a scoped service

If i have a service that stores a token as a lazy object, and the token is fetched inside a value factory, is that value persisted across multiple requests, or since the underlying service is scoped, lazy starts with a null value for every single request?