protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (DbEntities != null)
         {
             DbEntities.Dispose();
         }
     }
 }
        protected virtual void Dispose(bool disposing)
        {
            try
            {
                if (!disposing)
                {
                    return;
                }

                if (DbConn != null)
                {
                    DbConn.Dispose();
                }
            }
            catch (Exception ex)
            {
                SharedLogger.LogError(ex);
            }
            finally
            {
                DbConn = null;
            }
        }