✅ Layered architecture EF Core error when creating migrations
I have a Web Api project which is using .NET Core 7, my layers are DAL, Services Entities and API. I recently moved connection string to appsettings.json file (it was hardcoded in my appdbcondext class before) and created a extension method in DAL layer which sets connection string, I am using this in my startup project (API) program.cs but when I run
It was not happening when I hard code connection string in DAL layer and add/update migrations,
ApplicationDbContext.cs (DAL)
DataAccessExtension.cs (DAL)
Program.cs (API Layer)
dotnet ef migrations add testMig it gives an error It was not happening when I hard code connection string in DAL layer and add/update migrations,
ApplicationDbContext.cs (DAL)
DataAccessExtension.cs (DAL)
Program.cs (API Layer)
