Hi all,

We're trying to implement a WCF service using TransactionScope, and
NHibernate to persist changes within the TransactionScope.

I appreciate this could be/probably is a question better suited for WCF
forums, but I figured other NH Users may have the answer.

Our understanding is that you don't need to Flush() when using a
Transaction(Scope) and the default FlushMode (Auto). Are we wrong?

Simplified/Example Service:

public class Service : IService
{
  private ISession session;

  public Service()
  {
    // SessionBuilder configures, and builds an ISession, with default
FlushMode.
    session = new SessionBuilder().GetSession();
  }

  [OperationBehavior(TransactionScopeRequired = true,
TransactionAutoComplete = true)]
  public void Foo(string clientId)
  {
    session.Save(new Client { Id = clientId });
  }
}

The above never persists the new client. There are no obstructing foreign
keys or similar :)

Any help/advice appreciated.

Regards,
John.

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

Reply via email to