public InMemoryContextFactory() { DbContextOptions <VODContext> contextOptions = new DbContextOptionsBuilder <VODContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .EnableSensitiveDataLogging() .Options; this.EnsureCreation(contextOptions); ContextInstance = new TestVODContext(contextOptions); }
private void EnsureCreation(DbContextOptions <VODContext> contextOptions) { using var context = new TestVODContext(contextOptions); context.Database.EnsureCreated(); }