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);
        }
Пример #2
0
 //to create in memory repository (for test purporses)
 public EquipamentoRepository(AlarmsContext alarmsContext)
 {
     context = alarmsContext;
 }
Пример #3
0
 public EquipamentoRepository()
 {
     context = new AlarmsContext();
 }
 //to create in memory repository (for test purporses)
 public AlarmeRepository(AlarmsContext alarmsContext)
 {
     context = alarmsContext;
 }
 public AlarmeRepository()
 {
     context = new AlarmsContext();
 }