Esempio n. 1
0
        public IUnitOfWork Begin(UnitOfWorkOptions options)
        {
            var outerUow = _currentUnitOfWorkProvider.Current;

            if (outerUow != null)
            {
                //((UnitOfWorkBase)outerUow).Options = options;
                //var innerunitofwork = new InnerUnitOfWork(options);
                //innerunitofwork.Outer = outerUow;
                //innerunitofwork.Begin(options);
                //return innerunitofwork;
                return(new InnerUnitOfWork(options));
            }

            var uow = EngineContext.Current.Resolve <IUnitOfWork>();

            uow.Begin(options);

            _currentUnitOfWorkProvider.Current = uow;

            return(uow);
        }
 public new void Begin(UnitOfWorkOptions options)
 {
     Options             = options;
     IsBeginCalledBefore = true;
     BeginUow();
 }
 public override void Complete(UnitOfWorkOptions options)
 {
 }
 public InnerUnitOfWork(UnitOfWorkOptions options)
 {
     Options = options;
 }
Esempio n. 5
0
 public abstract void Complete(UnitOfWorkOptions options);
Esempio n. 6
0
 public void Begin(UnitOfWorkOptions options)
 {
     Options = options;
     PreventMultipleBegin();
     BeginUow();
 }