-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect service lifetime #37
Comments
Keep in mind that the Razor application is executed inside the client browser, so every user will have his own singleton object (i.e., it acts like a client application). |
@marcominerva My first sentence was:
Current name for Razor Components is Blazor Server Side. In this model application is executed on the server. On the client |
Ok, got it. In your first comment you quoted a FlightFinder.Client project file, so I thought you were referring only to the client side. |
This sample will probably be ported to Razor Components in the near future. You should change service lifetime to
scoped
. Otherwise state will be shared between all users which is not what you want.samples/samples/aspnetcore/blazor/FlightFinder/FlightFinder.Client/Startup.cs
Line 11 in 136b4bb
The text was updated successfully, but these errors were encountered: