Change Project.EntityFramework.Tests database provider #20670
-
Hi guys, I need to use HierarchyId for one of my projects and sice SQLite doesnt support it I need to change my database to be EntityFrameworkCore.InMemory.HierarchyId (this package containts the .UseInMemoryDatabase() used below)
but when I run one of my tests this is the error I am getting: System.InvalidOperationException : No database provider has been configured for this DbContext. A provider can be configured by overriding the 'DbContext.OnConfiguring' method or by using 'AddDbContext' on the application service provider. If 'AddDbContext' is used, then also ensure that your DbContext type accepts a DbContextOptions object in its constructor and passes it to the base constructor for DbContext. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
hi
|
Beta Was this translation helpful? Give feedback.
-
fixed it by removing the SQLIte dependency from EntityFrameworkCoreTestModule : AbpModule
dont forget to install EntityFrameworkCore.InMemory.HierarchyId |
Beta Was this translation helpful? Give feedback.
fixed it by removing the SQLIte dependency from EntityFrameworkCoreTestModule : AbpModule
dont forget to install EntityFrameworkCore.InMemory.HierarchyId