//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); }
public void SetOptions(UnitOfWorkOptions options) { UnitOfWorkOptions = options.Clone(); }
/// <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); }