Exemplo n.º 1
0
        public void Setup()
        {
            var options = new DbContextOptionsBuilder <FieldAgentContext>()
                          .UseInMemoryDatabase("testDatabase")
                          .Options;

            db = new FieldAgentContext(options);
            db.Database.EnsureDeleted();
            db.Database.EnsureCreated();

            db.SaveChanges();
            reportRepo = new ReportsRepository(FieldAgentContext.GetConnectionString());
        }
        public void Setup()
        {
            var options = new DbContextOptionsBuilder <FieldAgentContext>()
                          .UseInMemoryDatabase("testDatabase")
                          .Options;

            db = new FieldAgentContext(options);
            db.Database.EnsureDeleted();
            db.Database.EnsureCreated();

            db.SaveChanges();
            securityRepo = new SecurityClearanceRepository(db);
        }
Exemplo n.º 3
0
        public void Setup()
        {
            var options = new DbContextOptionsBuilder <FieldAgentContext>()
                          .UseInMemoryDatabase("testDatabase")
                          .Options;

            db = new FieldAgentContext(options);
            db.Database.EnsureDeleted();
            db.Database.EnsureCreated();

            db.SaveChanges();
            agencyRepo      = new AgencyRepository(db);
            agencyagentRepo = new AgencyAgentRepository(db);
            missionRepo     = new MissionRepository(db);
        }