configuration best practice

AmaraCode LLC 261 Reputation points
2021-01-01T02:51:09.67+00:00

I'm creating a Blazor Server application and I have static configuration data like the path to another api server. I'll need to access that api variable from multiple places such as in .razor components and even in the middleware pipeline.

Is there a best practice for where to keep this application level (and in some cases user level) information?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,390 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jaliya Udagedara 2,731 Reputation points MVP
    2021-01-01T19:45:17.363+00:00

    It would be through App Configuration. More Information: ASP.NET Core Blazor configuration

    If you need to maintain configuration data per user-level, then maybe you will need to store those in some kind of a database and retrieve from there. (For subsequent calls, you can cache the results, and pick up from cache instead of calling the database all the time).


0 additional answers

Sort by: Most helpful