public void RequireDbContextHandler_NestedDoInDbContextWithException_DbRollback()
        {
            Assert.Throws <InvalidOperationException>(() => RepoA.AddDoubleItemException());

            Assert.False(DbContextFactory.IsOpen());

            DbContextTemplate.ExecuteQuery <TestDbContext>(ctx => Assert.Empty(Items));
        }
        public void RequireDbContextHandler_NestedCallOnRequireDbMethod_ItemCreated()
        {
            RepoA.AddDoubleItem();

            Assert.False(DbContextFactory.IsOpen());

            DbContextTemplate.ExecuteQuery <TestDbContext>(ctx => Assert.Equal(2, Items.Count()));
        }