Wow, that was easy :) Thanks. Is this the preferred way of handling transactions if your DB supports it? Are there any drawbacks to it as opposed to rolling your own or using for example rhino-commons to handle transactions?
On Feb 9, 7:57 pm, Fabio Maulo <[email protected]> wrote: > Enclose it in a AmbientTransaction. > > 2009/2/10 Nick72 <[email protected]> > > > > > > > I'm wondering if anyone has suggestions on how to create the > > following: > > > I would like to do: > > > using (UnitOfWork.Start()) > > { > > Repo1.Save(something); > > Repo2.Save(somethingelse); > > } > > > However, each of the repositories uses a different database. > > > For this reason, I need the unit of work to handle multiple sessions > > and rollback each session when the unit of work fails. Also, I need > > the repositories to grab the session the unit of work has created in > > order to do their work, so I need I would guess some kind of service > > locator. > > > Thoughts on the best way to implement this? > > -- > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
