With.Transaction modes are there to support calling it recursively.
In general, I suggest using he automatic transaction facility. I had
consulted on a project that made use of it with asp.net mvc, and it just
worked.

Calling TransactionalFlush is _not_ recommended, and is there merely to aid
writing database tests.
Use proper transaction semantics or the ATM.

On Fri, Oct 10, 2008 at 10:26 PM, Will Shaver <[EMAIL PROTECTED]> wrote:

>
> I've spent a couple of days browsing Rhino-Tools and am mad at myself
> for not doing so six months ago. :(
>
> I'm thinking of incorporating RT into my project, but haven't seen any
> posts on using it with asp.net mvc.
>
> Does anyone have experience or recommendations for using the
> [Transactional][Transaction] attributes with asp.net mvc controllers?
>
> In reviewing the code, I also noticed:
>
> #1) It looks like in some places there is something like:
>
> using (UnitOfWork.Start())
> {
>  //perform actions
>  UnitOfWork.Current.TransactionalFlush();
> }
>
>
> #2) where other places it is something like:
>
> With.Transaction(delegate
> {
>
>  //perform actions
>
> });
>
> Which has two different modes -> when in a trasaction it doesn't
> commit, but when not in a transaction it does commit.
>
> with #1 you could be querying outside of a transaction. With #2 are
> you assuming that you'll always finish the transaction at some nesting
> level, so don't commit if we already have one?
>
> When using flushmode.Commit, is work done inside a disposed
> transaction lost for a later request?
>
> Hopelessly behind
>  -Will
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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