public void Setup()
        {
            var options = new DbContextOptionsBuilder <HSD6503_ProjectSD6503_Project_DBDatabaseFSMDBmdfContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()).Options;

            databaseContext = new HSD6503_ProjectSD6503_Project_DBDatabaseFSMDBmdfContext(options);
            databaseContext.Database.EnsureCreated();
        }
Exemplo n.º 2
0
        public void Setup()
        {
            // Creates a new database context in memory for each test, this ensures that nothing is kept
            //  between tests that could interfere with the testing or give incorrent results.
            var options = new DbContextOptionsBuilder <HSD6503_ProjectSD6503_Project_DBDatabaseFSMDBmdfContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()).Options;

            databaseContext = new HSD6503_ProjectSD6503_Project_DBDatabaseFSMDBmdfContext(options);
            databaseContext.Database.EnsureCreated();
        }
Exemplo n.º 3
0
 public HomeController(HSD6503_ProjectSD6503_Project_DBDatabaseFSMDBmdfContext context)
 {
     _context = context;
 }