예제 #1
0
 /// <summary>
 /// Used for creating an instance of UnitOfWork with certain options for the BarOMeterContext.
 /// Primarily used for testing the database with an inMemory database.
 /// </summary>
 /// <param name="options">
 /// Takes an DbContextOptions of BarOMeterContext as the parameter. This could for example be
 /// an inMemory database.
 /// </param>
 public UnitOfWork(DbContextOptions <BarOMeterContext> options)
 {
     _boMContext = new BarOMeterContext(options);
     _boMContext.Database.EnsureCreated();
 }
예제 #2
0
 /// <summary>
 /// Used for creating an instance of UnitOfWork with standard BarOMeterContext connectionstring.
 /// </summary>
 public UnitOfWork()
 {
     _boMContext = new BarOMeterContext();
     _boMContext.Database.EnsureCreated();
 }