Example #1
0
        public UoWScopeStack(TContext context)
        {
            Context = context;
            Stack   = new Stack <IUnitOfWork>();

            Id = UniqueIdGenerator.Generate();
        }
Example #2
0
        protected UnitOfWork(TContext context, IScopeManager scopeManager, IServiceLocator serviceLocator, ScopeType scopeType)
        {
            Context         = context ?? throw new ArgumentNullException(nameof(context));
            _scopeManager   = scopeManager ?? throw new ArgumentNullException(nameof(scopeManager));
            _serviceLocator = serviceLocator ?? throw new ArgumentNullException(nameof(serviceLocator));

            Id = UniqueIdGenerator.Generate();

            ScopeType = scopeType;
        }