Exemplo n.º 1
0
 public HRManager()
 {
     db        = new HRRepository();
     _disposed = false;
     //SERIALIZE WILL FAIL WITH PROXIED ENTITIES
     //dbContext.Configuration.ProxyCreationEnabled = false;
     //ENABLING COULD CAUSE ENDLESS LOOPS AND PERFORMANCE PROBLEMS
     //dbContext.Configuration.LazyLoadingEnabled = false;
 }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         if (disposing)
         {
             if (db != null)
             {
                 db.Dispose();
             }
         }
         db        = null;
         _disposed = true;
     }
 }