Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="proxyCreationEnabled">if set to <c>true</c> [proxy creation enabled].</param>
 /// <param name="lazyLoadingEnabled">if set to <c>true</c> [lazy loading enabled].</param>
 public UnitOfWork(bool proxyCreationEnabled, bool lazyLoadingEnabled)
 {
     Context = new BISTDbContext();
     Context.Configuration.ProxyCreationEnabled = proxyCreationEnabled;
     Context.Configuration.LazyLoadingEnabled   = lazyLoadingEnabled;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 public UnitOfWork()
 {
     Context = new BISTDbContext();
     Context.Configuration.ProxyCreationEnabled = false;
     Context.Configuration.LazyLoadingEnabled   = true;
 }