Share via

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?

Developer technologies | .NET | Blazor
0 comments No comments

Answer accepted by question author

Jaliya Udagedara 2,856 Reputation points MVP Volunteer Moderator
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).

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.