public UnitOfWorkNhibernate(ISession session) { _session = session; // this is not IoC code, it is direct dependency _repository = new NHibernateLighDataRepository(_session); // this will not work, save is nost commited //_repository = ObjectFactory.GetNamedInstance<IPearsonRepository>("NHibRepoLight"); _transaction = _session.BeginTransaction(); }
public UnitOfWork(IPearsonRepository repo) { _repository = repo; }