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); }
public AlarmesController() { alarmeRepository = new AlarmeRepository(); }
public AlarmesController(IAlarmeRepository repository, IMapper mapper) { _repository = repository; _mapper = mapper; }