Skip to content

Change Project.EntityFramework.Tests database provider #20670

Answered by LeanDualBoot
LeanDualBoot asked this question in Q&A
Discussion options

You must be logged in to vote

fixed it by removing the SQLIte dependency from EntityFrameworkCoreTestModule : AbpModule

[DependsOn(
    typeof(TreeApplicationTestModule),
    typeof(TreeEntityFrameworkCoreModule)
)]
public class TreeEntityFrameworkCoreTestModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpDbContextOptions>(options => {
            options.Configure(context => {
                context.DbContextOptions.UseInMemoryDatabase("hierarchyId", x => x.UseHierarchyId());                
            });
        });
    }
}

dont forget to install EntityFrameworkCore.InMemory.HierarchyId

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by LeanDualBoot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants