Beispiel #1
0
        protected ConsentContext CreateNewContextInSameTransaction()
        {
            var newContext = fixture.GetContext(outputHelper, Context.Database.GetDbConnection());

            newContext.Database.UseTransaction(transaction.GetDbTransaction());
            return(newContext);
        }
Beispiel #2
0
        protected DbTests(ITestOutputHelper outputHelper, DatabaseFixture fixture)
        {
            this.outputHelper = outputHelper;
            this.fixture      = fixture;
            Context           = fixture.GetContext(outputHelper);
            transaction       = Context.Database.BeginTransaction();

            createContext = CreateNewContextInSameTransaction();
            updateContext = CreateNewContextInSameTransaction();
            readContext   = CreateNewContextInSameTransaction();
        }