Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create a 'DbContext' of type 'MyIntIdentityContext' #29

Open
diegooliveirafarias opened this issue Aug 17, 2024 · 1 comment

Comments

@diegooliveirafarias
Copy link

diegooliveirafarias commented Aug 17, 2024

Describe the bug
When executing the command "╰$ dotnet ef migrations add addauth --verbose --context MyIntIdentityContext --project Core.Infra.Postgres --startup-project Api
"I'm getting the error

Cannot create a 'DbContext' of type 'MyIntIdentityContext'. Exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[Core.Infra.Postgres.EFContext.MyIntIdentityContext]' when trying to activate 'Core.Infra.Postgres.EFContext.MyIntIdentityContext'.' was thrown when trying to create an instance

I'm using .net 8

MyIntIdentityContext

image

CustomIdentityAndKeyConfig

image

Project Structure

image

MyIntIdentityContext

image

Expected behavior
I hope you can help me understand why when executing the command to create the migration I receive an error

@diegooliveirafarias
Copy link
Author

I haven't tested it yet, but it seems like it has something to do with the fact that I'm using .Net 8 or there's something missing from being implemented in the lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant