コード例 #1
0
ファイル: EFUnitOfWork.cs プロジェクト: jordanyaker/ncommon
        /// <summary>
        /// Default Constructor.
        /// Creates a new instance of the <see cref="EFUnitOfWork"/> class that uses the specified object context.
        /// </summary>
        /// <param name="resolver">An instance of <see cref="EFUnitOfWorkSettings"/> that contains settings for
        /// Entity Framework unit of work instances.</param>
        public EFUnitOfWork(IEFSessionResolver resolver)
        {
//#if DEBUG
            using (MiniProfiler.Current.Step("EFUnitOfWork()")) {
//#endif
                Guard.Against <ArgumentNullException>(resolver == null,
                                                      "Expected a non-null EFUnitOfWorkSettings instance.");
                _resolver = resolver;
//#if DEBUG
            }
//#endif
        }
コード例 #2
0
 public UnityExEFUnitOfWork(IEFSessionResolver resolver) : base(resolver)
 {
 }