private void EnsureDatabaseCreated() { var contextOptions = _container.GetInstance <DbContextOptions <ShipRegistryDbContext> >(); using (var context = new ShipRegistryDbContext(contextOptions)) { context.Database.EnsureCreated(); } }
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; }