Question

I tried to find tutorials/articles on using UnitOfWorkApplication in ASP.NET (not MVC). But all information I can find is about how to use it in ASP.NET MVC.

Does it mean that it is not possible to use Rhino.Commons.HttpModules.UnitOfWorkApplication in our old webform applications?

I run into the problem that I am using repository inherited from Rhino.Commons.NHRepository in ASP.NET pages. It requires to call UnitOfWork.Start() before calling functions in the repository. I'm quite lost in figuring out how to hook that into ASP.NET.

Was it helpful?

Solution

Yes, it works with regular ASP.NET. Just make your GlobalApplication inherit from UnitOfWorkApplication. UnitOfWork.Start() is automatically executed when the request starts (source code).

For reference, check the wiki page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top