protected override void Dispose(bool disposing) { try { _db.Dispose(); _userService.Dispose(); } catch { } base.Dispose(disposing); }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { //dispose managed ressources } } //dispose unmanaged ressources if (_db != null) { _db.Dispose(); } disposed = true; }