Assuming those are in the same session, check the SQL being generated
and then try that SQL in isolation, it may be an issue with whatever
DB you're using.

Look for "Nested transactions" in this for an explanation of MS SQL
Server server nested transactions:
http://www.codeproject.com/KB/database/sqlservertransactions.aspx


On Mar 22, 8:07 am, Ayende Rahien <[email protected]> wrote:
> That _should_ work, I think
>
>
>
> On Sat, Mar 21, 2009 at 9:45 PM, kuhlmancer <[email protected]> wrote:
>
> > What is the proper way to nest transaction scopes using UnitOfWork?
>
> > I want to wrap integration tests in a transaction scope that I can
> > rollback after the test completes.  But I still want to be able to use
> > transactions in my tests.
>
> > I want something like this:
>
> > <code>
> > [TestInitalize]
> > public void TestInit() {
> >    // create transaction scope
> > }
>
> > [TestCleanup]
> > public void TestCleanup() {
> >    // rollback changes from test
> > }
>
> > [TestMethod]
> > public void Test() {
> >    using (UnitOfWork.Start()) {
> >        // start transaction in new scope
>
> >        // logic
>
> >        // commit transaction
>
> >        // test changes
> >    }
> > }
> > </code>
>
> > I've seen that UnitOfWork is nestable, but I don't know how that
> > affects sessions and transactions.
>
> > Any help or clarification would be appreciated.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to