Reputation: 89
I'm teaching myself to program, I'm experimenting with a Blazor Server application using c# and asp.net core.
Take the hypothetical class Workspace
:
public List<Item> Items { get; set; }
Each user
may be associated to one-to-many instances of Workspace
; this will authorise them to select one of said Workspace
instances and perform create, read, update, and delete operations on the child Item
instances (i.e. Workspace.Items
). Note, these operations may be performed on different pages.
What is the best way to store a reference to the current Workspace
? e.g. should I store the current Workspace
as a property in a User
account? or maybe there is a better way of recording the session state?
Upvotes: 2
Views: 6841
Reputation: 51715
On Blazor Server you can store state data in several places, is full documented at ASP.NET Core Blazor state management. Summary:
Upvotes: 4