If the 2nd form is a child form -- for example a modal form to edit details -- then it is participating in the same UOW as the parent and the UOW should be passed from the parent to the child, usually in the constructor.
I'm not a fan of the approach in Gabriel Schenker's article; I think it's better to use the ISession directly as a UOW implementation.
Ayende's article referenced in James' answer is good one but we do it a bit differently. For top-level forms that control their own UOW, we have a static method in Program.cs to create an ISession that is invoked in the form's constructor:
private readonly ISession _session;
public frmPlayerViewer()
{
InitializeComponent();
// bail out if we're in the designer
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
{
return;
}
_session = Program.OpenEvtSession(FlushMode.Commit);
}
To make sure the ISession is properly disposed, override OnFormClosing:
protected override void OnFormClosing(FormClosingEventArgs e)
{
base.OnFormClosing(e);
if (!e.Cancel && _session != null)
{
if (_session.Transaction.IsActive)
{
const string msg = "OnFormClosing with active transaction.";
log.Error(msg);
throw new Exception(msg);
}
_session.Dispose();
}
}
This code is in a base Form that top-level forms extend.