private void EnsureDatabaseCreated()
        {
            var contextOptions = _container.GetInstance <DbContextOptions <ShipRegistryDbContext> >();

            using (var context = new ShipRegistryDbContext(contextOptions))
            {
                context.Database.EnsureCreated();
            }
        }
Beispiel #2
0
 public FakeShipRegistryContextFactory(DbContextOptions <ShipRegistryDbContext> options)
 {
     //in the fake we want to re-use the UoW to allow us to populate for tests
     _context = new FakeShipRegistryDbContext(options);
 }
 public ShipRepositoryAsync(ShipRegistryDbContext uow)
 {
     _uow = uow;
 }