I have an issue with Blazor Server:
my DI always get the same ID (instance) on the component's button click
For example:ILoginService.ID = "123"
When i click a button - if the login fails , and retry it will have the same instance ID ="123"
The dependency injection was defined below:
I am aware that if I refresh the page, the DI will work as expected (because it is scope service - new every request) . but it's not fit on my scenario.
I have to refresh the DI object only before or after the button click, so i have a new instance each button click
Is there a way to refresh the DI object only
Already changed the lifetime of DI to transient. Still not working
I was expecting the following
Before Click:ILoginService.ID = "123"
Then Login failedRetry ClickILoginService.ID = "456"
