public bool SaveChanges() { try { _invoicingContext.SaveChanges(); return(true); } catch { // Something went wrong _invoicingContext.Dispose(); return(false); } }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { SetupContext?.Dispose(); AssertContext?.Dispose(); Client?.Dispose(); _server?.Dispose(); } _disposedValue = true; } }