コード例 #1
0
        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
 public AlarmesController()
 {
     alarmeRepository = new AlarmeRepository();
 }
コード例 #3
0
 public AlarmesController(IAlarmeRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }