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

Bug - Testes de integração crashando por conta da incompatibilidade de DBs #26

Open
pedroka-dev opened this issue Jun 28, 2024 · 0 comments

Comments

@pedroka-dev
Copy link
Owner

pedroka-dev commented Jun 28, 2024

Todos os testes de integração quebram por conta da incompatibilidade dentre 'Microsoft.EntityFrameworkCore.InMemory' e 'Npgsql.EntityFrameworkCore.PostgreSQL'.

Stacktrace completo:
Message: 
System.InvalidOperationException : Services for database providers 'Microsoft.EntityFrameworkCore.InMemory', 'Npgsql.EntityFrameworkCore.PostgreSQL' have been registered in the service provider. Only a single database provider can be registered in a service provider. If possible, ensure that Entity Framework is managing its service provider by removing the call to 'UseInternalServiceProvider'. Otherwise, consider conditionally registering the database provider, or maintaining one service provider per database provider.

Stack Trace: 
DbContextServices.Initialize(IServiceProvider scopedProvider, DbContextOptions contextOptions, DbContext context)
DbContext.get_ContextServices()
DbContext.get_InternalServiceProvider()
DbContext.get_DbContextDependencies()
DbContext.SetTEntity
BaseRepository1.ctor(XCompanyDBContext db) line 15
ProductRepositoryTest.ctor() line 19
RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

@pedroka-dev pedroka-dev converted this from a draft issue Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant