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