This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Apr 02 12:05:47 -0700 2009 | |
| |
Libraries/ | Sun Apr 12 23:32:20 -0700 2009 | |
| |
Partstore.config | Thu Oct 23 11:40:45 -0700 2008 | |
| |
README.markdown | Fri Oct 24 08:52:45 -0700 2008 | |
| |
Source/ | Mon Nov 02 11:14:04 -0800 2009 | |
| |
rakefile | Thu Apr 02 10:21:34 -0700 2009 |
README.markdown
Machine.UoW
Example
Setting up and configurating for use with NHibernate under ASP.NET:
ISessionFactory sessionFactory = ?;
IUnitOfWorkManagement unitOfWorkManagement = new UnitOfWorkManagement();
unitOfWorkManagement.AddEvents(new NHibernateUoWEvents(sessionFactory));
IUnitOfWorkFactory factory = new UnitOfWorkFactory(unitOfWorkManagement);
UoW.Provider = new HttpContextUnitOfWorkProvider(factory);
From then on, it's a matter of:
using (IUnitOfWork uow = UoW.Start())
{
uow.Session().CreateQuery("FROM People").List<SessionType>();
}
In this case Session() is an extension method provided by the Machine.UoW.NHibernate assembly. Machine.UoW has no dependency on NH.
Settings can be passed to the underlying UoW plugins:
using (IUnitOfWork uow = UoW.Start(new NHibernateSessionSettings(IsolationLevel, FlushMode)))
{
uow.Session().CreateQuery("FROM People").List<SessionType>();
}
Of course you can clean this up, etc... Machine.UoW.NH finds the settings and uses them.







