/// <summary>
 /// Dispose object based on flag value
 /// </summary>
 /// <param name="disposing">Flag that indicates if disposing is in progress</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing &&
         dbContext != null)
     {
         dbContext.Dispose();
         dbContext = null;
     }
 }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             context?.Dispose();
         }
     }
     this.disposed = true;
 }