I'd agree with beardman too, especially if I was going to have more than one GUI. I'd probably find myself factoring operations that I do in the GUI into another controller layer, which handles transaction control. Despite the fact that ASP.NET pages *are* controllers, they're not exactly reusable in different contexts :)
Transaction Control
When I started playing with NHibernate, I dug around quite a bit to find some ideas for transaction control. Baggins idea of transparent control is quite appealing. In fact, I've come across it a few times in my virtual travels. Also, Clifton Nock discusses it in his book Data Access Patterns...
http://www.amazon.co.uk/exec/obidos/tg/detail/-/0131401572/ref=pd_sxp_f/026-7659574-1432429?v=glance&s=books
From what I understand, this "transparent" control is called *declarative* transaction demarcation, and is present in quite a few of the Java frameworks (Spring, JBoss etc). In .NET, you might have something that looks like this...
public class ProductService
{
[Transaction.Required]
public void DoSomething(Product product)
{
}
}
As far as I remember, Spring.NET were going to implement such transaction control in their framework. Didn't see anything in their docs though, so perhaps it's still in the pipeline.
Session Scope
My NHibernate wrapper hides the fact that HttpContext is being used, and works equally well in a WinForms environment. The trick I use is to determine if their is a HttpContext available, and if not then switch to a Thread Local Session strategy. This means that in an ASP.NET environment, the HttpContext is automatically used, and in a WinForms environment, thread local storage is automatically used. All this is hidden from the client.
[/b]