‘Unable to resolve service for type ¨Microsoft.entityFrameworkCore.DbContextOptions¨1[LibraryData.LibraryContext] while attempting to activate

I fixed this error by specifying –project and –startup-project options to Entity Framework Core CLI tools like this:

dotnet ef database update --verbose --project CommandService.Data   --startup-project CommandService

–project means which project contains the DbContext class

–startup-project means which project contains the database connection information and other information.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)