I have a .NET Core solution with 3 projects: MVC app, data access layer (class library that contains Entity Framework context and models) and business layer (class library). In the MVC project, there is a config json file with values like connection string and resources paths etc.
But what if I need to have, besides the MVC project, another project or projects for different client apps (for example, a REST API and/or desktop app), that needs to use the same database and resource paths? I guess i could just create a json file in each of these projects and manually keep them in-sync to have the same values, but is this the correct way of doing this?
You would need to have the appSettings file just in the root folder of your ASP.NET (Core) MVC project. All projects will read from these AppSettings