public AlarmeRepositoryTest() { var builder = new DbContextOptionsBuilder <AlarmsContext>(); builder.UseInMemoryDatabase("db_Alarms"); AlarmsContext context = new AlarmsContext(builder.Options); context.Database.EnsureDeleted(); context.Database.EnsureCreated(); alarmeRepository = new AlarmeRepository(context); }
//to create in memory repository (for test purporses) public EquipamentoRepository(AlarmsContext alarmsContext) { context = alarmsContext; }
public EquipamentoRepository() { context = new AlarmsContext(); }
//to create in memory repository (for test purporses) public AlarmeRepository(AlarmsContext alarmsContext) { context = alarmsContext; }
public AlarmeRepository() { context = new AlarmsContext(); }