csharp Unit Test IDbContextFactory

Code Example - csharp Unit Test IDbContextFactory

                
                        mockDbFactory.Setup(f => f.CreateDbContext())
    .Returns(() => new SomeDbContext(new DbContextOptionsBuilder<SomeDbContext>()
        .UseInMemoryDatabase("InMemoryTest")
        .Options));