/// <summary> /// 初始化 /// </summary> /// <param name="options"></param> /// <exception cref="Exception"></exception> public virtual void Initialize(UnitOfWorkOptions options) { Check.NotNull(options, nameof(options)); if (Options != null) { throw new Exception("This unit of work is already initialized before!"); } Options = _defaultOptions.Normalize(options.Clone()); IsReserved = false; }
public virtual IUnitOfWork Create() { return(Create(_defaultOptions.Clone())); }