I write a lot of my code in static methods/classes/variables so that they can be accessed across the site, for globalization ideas and to “spare” the creation and destruction of classes when they are not data preservation classes(dbcontext for example).
The question is, must these classes/methods be accessed only once at a time? Do they cause any kind of bottle-neck?
Thanks.
No, they can be accessed multiple times and in parallel. You should be careful with static classes in multi-threaded applications as you need to ensure that they are thread safe.
This will depend on how they are written and what they do.