Пример #1
0
        public void Create_Should_ReturnNewDbContextInstance()
        {
            // Arrange & Act
            var newContext = LibrarySystemEfDbContext.Create();

            // Assert
            Assert.IsNotNull(newContext);
            Assert.IsInstanceOf <ILibrarySystemEfDbContext>(newContext);
        }
Пример #2
0
 public static void Initialize()
 {
     Database.SetInitializer(new MigrateDatabaseToLatestVersion <LibrarySystemEfDbContext, Configuration>());
     LibrarySystemEfDbContext.Create().Database.CreateIfNotExists();
 }