new to Blazor I'm not sure to understand how user session is working.
I'm trying to do a web site with Blazor Server Hosting (.NET Core 3.1). I have a service to Store a Customer like this :
public class AppData
{
public Customer CurrentCustomer { get; set; }
public AppData()
{
this.CurrentCustomer = new Customer() { IsWebConnected = false };
}
}
On Startup.cs I add :
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
AppData data = new AppData();
services.AddSingleton<Service.AppData>(data);
}
What does it mean ? When a CurrentCustomer is set (with a login page for exemple), I can access it with relative data on different pages when I launch on a browser. But when I launch another browser on my pc, I cab see the same user set (with same vaues). It seems to be shared.
I have been working on old ASP.NET Webform and I'm trying to do the same things than Session (One session by user), but is it the same way with Blazor ?
Thanks for your help.