public DatabaseFixture() { _appSettings = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .Build(); _connectionString = _appSettings.GetValue <string>("AppSettings:ConnectionString"); var serviceProvider = new ServiceCollection() .AddEntityFrameworkInMemoryDatabase() .BuildServiceProvider(); var options = new DbContextOptionsBuilder <eFlightDbContext>() .UseInMemoryDatabase(_connectionString) .UseInternalServiceProvider(serviceProvider) .Options; Context = new eFlightDbContext(options); Seeder = new TestSeed(Context); Seeder.RunSeed(); }
public TestSeed(eFlightDbContext context) { _context = context; }
public TravelPackageReservationRepository(eFlightDbContext eFlightDbContext) : base(eFlightDbContext) { }
public HotelReservationRepository(eFlightDbContext eFlightDbContext) : base(eFlightDbContext) { }
public RepositoryBase(eFlightDbContext eFlightDbContext) { _context = eFlightDbContext; }