My application will have the user open a file that will be read by the application, and that file will contain database information that will be stored into an object.
The way I see a Blazor app now is that MainLayout.razor is the component that renders my full page: the navbar and the @Body. I would like the file name I grab from the open dialog box to be passed to my project where I then create my object and fill it with the file information.
I got working where I created the object in one of the blazor component modules, only to realize that I would need to do this for all my modules, that is read and parse my database into an object everytime the user clicks a new tab to load a new component. I would like this reading and parsing of the database to be done once, stored in my object and have that object be available to all potential blazor components in my project.
Where should I define the instance of my object and how should I make that object seen and even be updated by all other components? Is this even possible? Am I passing this object as a parameter, is it part of my routing. I'm not sure how to go about this.