public DatabaseFixture()
        {
            _parentContext = new SubcutaneousTestsPresentationDbContext();
            _parentContext.Database.Connection.Open();
            _transaction = _parentContext.Database.Connection.BeginTransaction();

            SeedDbContext = GetNewDbContext();
            WorkDbContext = GetNewDbContext();
            VerifyDbContext = GetNewDbContext();
        }
 static DatabaseFixture()
 {
     DatabaseConfiguration.UseAzureExecutionStrategy = false;
     var testPath = Path.GetDirectoryName(typeof(DatabaseFixture).Assembly.CodeBase.Replace("file:///", ""));
     AppDomain.CurrentDomain.SetData("DataDirectory", testPath); // For localdb connection string
     using (var migrationsContext = new SubcutaneousTestsPresentationDbContext())
     {
         migrationsContext.Database.Initialize(false);
     }
 }
 private SubcutaneousTestsPresentationDbContext GetNewDbContext()
 {
     var context = new SubcutaneousTestsPresentationDbContext(_parentContext.Database.Connection);
     context.Database.UseTransaction(_transaction);
     return context;
 }