As Fabio suggests, a UoW is not equivalent to an http request. A UofW should be a complete action within a database context. Normally a query, or very infrequently a series of queries, may make a unit of work. You should call Commit at that point.
Then when you start your update you begin a new transaction and again commit after the update process, but before new queries not related to the update process are issued. John Davidson On Wed, Mar 24, 2010 at 1:43 PM, Sal <[email protected]> wrote: > > Well if you can call Flush() in the service component, why couldn't you > call > > Commit(), which would then do a Flush()? > > Yeah, I guess I could. This a bit of a departure from our current > approach, so I need to think it through. My current unit of work > implementation is handled at the http request level. A session and > transaction are opened at the beginning, and closed and committed at > the end. It looks like what I need is more granular control over > transactions....almost at the service layer method level. > > On Mar 24, 1:36 pm, John Davidson <[email protected]> wrote: > > Well if you can call Flush() in the service component, why couldn't you > call > > Commit(), which would then do a Flush()? > > > > John Davidson > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- 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.
