/// <summary> /// Registers a scope as the top level scope on the <see cref="RunningScopes"/> stack. /// </summary> /// <param name="scope">The <see cref="UnitOfWorkScope"/> instance to set as the top level scope on the stack.</param> private static void RegisterScope(UnitOfWorkScope scope) { Guard.Against <ArgumentNullException>(scope == null, "Cannot register a null UnitOfWorkScope instance as the top level scope."); Data.UnitOfWork.Current = scope.UnitOfWork; //Setting the UnitOfWork isntance held by the scope as the current scope. RunningScopes.Push(scope); }
private void RegisterScope(UnitOfWorkScope scope) { UnitOfWork.Current = scope.RelUnitOfWork; RunningScopes.Push(scope); }