✅ Unable to create migration - 'Unable to resolve service for type 'DbContextOptions'
This is my first time creating migrations (never had a need until now), so please bear with me.
I'm trying to use
dotnet ef migrations add AMigrationName
dotnet ef migrations add AMigrationName
to add a migration to my project, However, I get this error:
Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[Treehouse_Guardian.Database.DatabaseContext]' while attempting to activate 'Treehouse_Guardian.Database.DatabaseContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[Treehouse_Guardian.Database.DatabaseContext]' while attempting to activate 'Treehouse_Guardian.Database.DatabaseContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728