Esempio n. 1
0
        public InMemoryContextFactory()
        {
            DbContextOptions <VODContext> contextOptions = new
                                                           DbContextOptionsBuilder <VODContext>()
                                                           .UseInMemoryDatabase(Guid.NewGuid().ToString())
                                                           .EnableSensitiveDataLogging()
                                                           .Options;

            this.EnsureCreation(contextOptions);

            ContextInstance = new TestVODContext(contextOptions);
        }
Esempio n. 2
0
 private void EnsureCreation(DbContextOptions <VODContext> contextOptions)
 {
     using var context = new TestVODContext(contextOptions);
     context.Database.EnsureCreated();
 }