I am trying to read content from a json file in .Net core API and assign to a list and use it for doing business logic.
API Layers:
Project -> Business -> Repository -> DB
I need to read content from a json file in the Business layer. File content will not change frequently. I am thinking of reading the file in the Business layer class constructor.
Questions:
Do I need to keep this file in App_Data folder?
Can I use the HttpContextAccessor in the business layer constructor and read the content?
Can someone help in providing the best way to achieve? Please let me know if the question is not clear and I will rephrase it.