protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { TransactionRepository.Dispose(); TransactionRepository = null; UserRepository.Dispose(); UserRepository = null; AssetRepository.Dispose(); AssetRepository = null; CategoryRepository.Dispose(); CategoryRepository = null; DbContext.Dispose(); DbContext = null; } } disposed = true; }