protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Beispiel #2
0
        /// <summary>
        /// If disposing, calls dispose on the usersDb.  Always nulls out the usersDb
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (DisposeUserDb && disposing && UsersDb != null)
            {
                UsersDb.Dispose();
            }

            _disposed = true;
            UsersDb   = null;
        }