Beispiel #1
0
        //Determine whether a new unit of work needs to be created
        private bool NeedCreateNewUnitOfWork(UnitOfWorkOptions options)
        {
            bool result = false;

            switch (options.Limit)
            {
            case UnitOfWorkLimit.Required:
                result = _callcontext.GetCurrentUow() == null;
                break;

            case UnitOfWorkLimit.RequiresNew:
                result = true;
                break;

            case UnitOfWorkLimit.Suppress:
                result = true;
                break;

            default:
                break;
            }
            return(result);
        }
Beispiel #2
0
 public void SetOptions(UnitOfWorkOptions options)
 {
     UnitOfWorkOptions = options.Clone();
 }
Beispiel #3
0
 /// <summary>
 /// Child unit of work invalid settings.because it's use parent options
 /// </summary>
 /// <param name="options"></param>
 public void SetOptions(UnitOfWorkOptions options)
 {
     //_parentUow.SetOptions(options);
 }