/// <summary> /// Initializes a new instance of the <see cref="RavenDbUnitOfWork" /> class. /// </summary> /// <param name="session">The session.</param> /// <param name="observer">The observer.</param> /// <exception cref="System.ArgumentNullException">session</exception> public RavenDbUnitOfWork(IDocumentSession session, IUnitOfWorkObserver observer) { if (session == null) throw new ArgumentNullException("session"); Session = session; _observer = observer; _observer.Create(this); }
/// <summary> /// Initializes a new instance of the <see cref="RavenDbUnitOfWork" /> class. /// </summary> /// <param name="session">The session.</param> /// <param name="observer">The observer.</param> /// <exception cref="System.ArgumentNullException">session</exception> public RavenDbUnitOfWork(IDocumentSession session, IUnitOfWorkObserver observer) { if (session == null) { throw new ArgumentNullException("session"); } Session = session; _observer = observer; _observer.Create(this); }
public FakeUnitOfWork(IUnitOfWorkObserver observer, IDbTransaction transaction) { _observer = observer; _observer.Create(this); _transaction = transaction; }
public FakeUnitOfWork(IUnitOfWorkObserver observer, IDbTransaction transaction) { _observer = observer; _observer.Create(this); _transaction = transaction; }